文章目录
  1. 1. 快速起步

使用Hugo来搭建静态内容超级简单了。 参考 https://gohugo.io/getting-started/quick-start/

快速起步

下载hugo软件包,解压到本地之后就可以开始了。命令如下

1
2
3
4
5
6
hugo new site quickstart
cd quickstart
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo "theme = 'ananke'" >> hugo.toml
hugo server

新建内容,比如POST。 新生成的md的头部meta中draft字段的值为true, 当编写完成后要发布时改为false

1
hugo new posts/my-first-post.md

构建发布,生成的静态内容位于public目录下,可以用于部署在nginx下。

1
hugo
文章目录
  1. 1. 快速起步