{"repo":"ahuigo/ahuigo.github.io","free":true,"listed":false,"github":"https://github.com/ahuigo/ahuigo.github.io","clone":"git clone https://github.com/ahuigo/ahuigo.github.io.git","description":"Ahuigo's notes","language":"JavaScript","stars":20,"topics":["blog","markdown","no-build-required"],"license":null,"category":"productivity","readme_excerpt":"纯静态博客 本博客是完全纯静态blog，js 代码500 多行，发布文章只需要git push 即可（不需要 build） - Fork 地址: https://github.com/ahuigo/yourname.github.io - 示例地址：https://ahuigo.github.io/?p=f readme 支持的功能 - [x] Markdown + Latex + TOC目录(Table of Content) + TOC滚动 - [x] 多级动态目录: 适合 海量 笔记按 目录 归纳整理、总结 - [x] 目录缓存(缓存时间1天) - [x] Disqus - [x] 自适应 - [x] Twitter & 微博分享 - [x] RSS支持(由pre-commit hooks 自动生成) - [x] 归档 使用方法 1. 首先Fork 此仓库: https://github.com/ahuigo/yourname.github.io 2. 然后用的你的帐号重命名仓库: {yourname}.github.io , 这样就可直接访问: {yourname}.github.io 3. 修改 index.html 中的 config 变量 e.g.: // index.html const config = { // your github's username 'user': '{yourname}', // your github's repo name 'repo': '{yourname}.github.io', // your disqus's username 'disqus user': '{disqus user}', } 4.最后，进入到 /post/ 目录，编写你的markdown 文件(你可以建多层子目录) ├── img └── post └── index.md ├── go/ └── python/ 编写完了后, 不需要构建，直接提交git push，就可查看你的文章了. 数学公式 展示数学公式的库主要有 mathjax 和katex, 本博采用了非常轻量的katex。 1. $ 用与行内公式; 2. $$ 用于段落公式; 可以参考这个例子： katex 支持标准的latex，如果想转义数学符号: # \\# $ \\$ % \\% & \\& \\ \\ ^ \\^ { \\{ } \\} 如果想定义图片名，先输入类似 readme 的图片路径, 并选中，再按 Option+Cmd+V , 路径就自动替换为markdown 的图片路径 . 如果截图体积优点大, 可以使用Squoosh 等工具压缩, 或者上传到图床 更多截图工具参考：https://zhuanlan.zhihu.com/p/25154768 生成缓存目录.dir.json 默认使用github api获取目录，我测试发现这个api 不利于seo. 可以通过提前生成.dir.json(相当于site map) 更好的支持seo mac/linux可以使用以下脚本自动生成 .dir.json (只有修改过的文件才会生成dir.json) ln -s ./tool/gen-postdir.py .git/hooks/pre-commit 也可手动生成所有目录的.dir.json $ ./tool/gen-postdir.py -a generate .dir.json for all directory 有了.dir.json 就可以在index.html 开启","default_branch":null,"files":null,"tree":[],"storefront":"/r/ahuigo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ahuigo/ahuigo.github.io/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}