常用命令

新建草稿

hugo new hello.md

hugo new about/index.md

hugo new post/first.md

运行Hugo

1
$ hugo server --theme=hyde --buildDrafts

部署

1
$ hugo --theme=hyde --baseUrl="http://coderzh.github.io/"

生成最终页面,静态文件会默认生成到public目录

其它写法:

hugo -D #部署到public

$ hugo server -D #部署到public并启动服务

$ hugo server -t even –buildDrafts

-t 指定渲染主题, –theme=hyde

-D –buildDrafts 生成标识为草稿的页面,即draft = true的文章也会生成。

常用页面指令