命令行(Command)

记录 Hugo 常用命令行

命令行顾名思义,这里不赘述其具体用法 (具体用法参考hugo -h官方文档);这里仅做分类,作用快速查找。

帮助

1hugo compeletion [bash/fish/powershell/zsh]
2hugo gen [doc/man]

环境

1hugo version
2hugo env
3hugo config 
4hugo config mounts
5hugo list [all/drafts/expired/future]

构建 🔥

1hugo new site <project_name>
2hugo new theme <theme_name>
3hugo new <page_name>

测试 🔥

1hugo serve --buildDrafts --buildExpired --buildFuture 

模块

1hugo mod [graph]
2hugo mod init 
3...

转换/迁移

1hugo import [jekyll]
2hugo convert [toJSON/toTOML/toYAML] # 不建议使用

发布 🔥

1hugo --cleanDestinationDir --minify
2hugo deploy
Last modified November 4, 2023: Correcting content dir (da1a055)