Hugo 文章分类管理

文件夹

内容存放在content/目录下方, content/下方的子目录会形成资源URI,

例如 content/blog/doc.md 文章访问目录即为 https//XXX.github.io/blog.doc.md

分类管理

文章内容表述 (Front Matter)

使用进行分类, 默认只有tags

1
2
3
tags:
- Go
- fast

可以在config添加自定的分类选项

1
2
3
taxonomies:
	series: series
	category: categories

文章路径

类别描述地址
home网站homepage/index.html
page指定页面/post/页面/index.html
section分区/section/index.html
taxonomy分类/tags/index.html
term分类系列/tags/go/index.html

_index.mdindex.md

在文件夹下方添加_index.md会识别成section. 在文件夹下方添加index.md会被识别成文章.

千万不要在默认的content目录下方添加index.md