Hugo
Hugo译为雨果,Go 语言实现的一个博客生成器。
进入官网——https://gohugo.io/
以下为Mac安装介绍
* Mac安装方式
1. 用Homebrew快速安装
```
brew install hugo
Hugo Version
```
2. 创建一个新站点
`hugo new site quickstart`
3. 添加主题
```
cd quickstart
git init
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
echo 'theme = "ananke"' >> config.toml
```
4. 添加一些内容
`hugo new posts/my-first-post.md`
5. 启动Hugo服务器
`hugo server -D`
在http:// localhost:1313 /导航到新站点
6. 自定义主题
站点配置
config.toml在文本编辑器中打开:
```
baseURL ="https://example.org/"
languageCode ="ch-Hans"
title ="My New Hugo Site"
theme ="ananke"
```
如果您已准备好域名,需要设置baseURL。
提示:在Hugo服务器运行时对站点配置或站点中的任何其他文件进行更改,您将立即看到浏览器中的更改,但您可能需要清除缓存。
7. 构建静态页面
`hugo`
./public/默认情况下输出将在目录中(-d/ --destinationflag更改它,或publishdir在配置文件中设置)。