Hugo结合Github搭建博客
Hugo
安装Hugo macOS环境
brew install hugo # 检测安装成功 hugo version Hugo Static Site Generator v0.55.6/extended darwin/amd64 BuildDate: 2019-08-26T15:23:01Z 生成站点 使用hugo创建blog站点
hugo new site blog cd blog # 目录结构 tree blog #blog #├── archetypes #│ └── default.md #├── config.toml #├── content #├── data #├── layouts #├── static #└── themes archetypes:包括内容类型,在创建新内容时自动生成内容的配置
config.toml:是网站的配置文件,包含一些基本配置和主题特有的配置
content:包括网站内容,全部使用markdown格式
data:存放自定义模版,导入的toml文件(或json,yaml)
layouts:包括了网站的模版,决定内容如何呈现
static:包括了css, js, fonts, media等,决定网站的外观
themes:用于存放主题,可以去官方https://themes.gohugo.io/下载喜欢的主题
安装主题
git init git submodule add https://github.
[Read More]