Hugo施工记录
文章目录
整理记录Hugo的使用过程。
why
- 快速的页面编译生成速度
- 跨平台支持
- 页面实时刷新
- 皮肤支持
- 安装方便
installation
hugo二进制文件 链接地址
常见命令
# 生成站点
hugo new site /path/to/site
# 创建文章
hugo new post/first.md
# 调试
hugo server --theme=even --buildDrafts
# 部署运行
hugo --theme=even --baseUrl="https://sslyxhz.github.io/"
# 清理
hugo --gc
安装皮肤
git clone --depth 1 --recursive https://github.com/sslyxhz/hugo-theme-even.git themes
技巧
Shortcodes
https://sslyxhz.github.io/post/markdown%E7%AE%80%E5%8D%95%E5%85%A5%E9%97%A8/ => https://example.com/blog/post/
https://sslyxhz.github.io/post/markdown%E7%AE%80%E5%8D%95%E5%85%A5%E9%97%A8/#tldr => https://example.com/blog/post/
#tldr:caffebad
对比
Items | Hexo | Hugo |
---|---|---|
插件 | 丰富 | 较少 |
主题 | 优 | 良 |
速度 | 快 | 非常快 |
安装 | 依赖较多,有坑 | 简洁 |
文档 | 中文支持较好 | 中文支持较差 |