Hugo常用命令

文章目录

当前欠缺:

  • 无法渲染数学公式如 $a$, $x^2$
  • 代码没有显示所用语言

基础命令

  1. 修改设置后重新构建网站:
1hugo server --cleanDestinationDir
  1. 创建新内容
1hugo new content -k post 'job/new_posts/index.md'

废弃:hugo new posts/new_posts/index.md # Syrella.com

  1. 推送到GitHub Page
1hugo
2
3git add .
4
5git commit -m "更新时间"
6
7git push
  1. 脚本化创建和推送过程
1bash newpost.sh # 在其他电脑需要修改hugo.exe路径
1bash update.sh