Hugo安装

1、hugo new site quickstart 建立站点

2、cd quickstart 进入站点目录

3、git init 初始化

4、git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke 下载主题

5、echo “theme = ‘ananke'” >> hugo.toml 添加主题到配置文档

6、cp -R themes/hugo-book/exampleSite/content.en/* ./content 复制案例网站数据到主站

7、hugo new content/posts/my-first-post.md 新建文档


title: “我的第一篇文章”
date: 2022-11-20T09:03:20-08:00
draft: true


8、hugo server –minify –theme hugo-book 刷新主题

9、hugo server -D 重新发布