在文章页里,在banner中会展示Front Matter中的如下字段:
-
title 标题
-
date 发布时间
-
categories 分类 没有则不展示
-
tags 标签 没有则不展示
-
cover 封面(背景图) 没有则不展示
在单页面里(如Link,About等)或其他着陆页在banner中会展示Front Matter中的如下字段:
-
title 标题
-
description 页面描述 没有则不展示
-
cover 封面(背景图) 没有则不展示
文章页与单页面在hugo它们的Kind都是page!
其他着陆页有:section,taxonomy,term等,这里参考Hugo官方文档中的表格信息:
| Kind | Description | Example |
|---|---|---|
| home | The landing page for the home page | /index.html |
| page | The landing page for a given page | my-postpage (/posts/my-post/index.html) |
| section | The landing page of a given section | postssection (/posts/index.html) |
| taxonomy | The landing page for a taxonomy | tagstaxonomy (/tags/index.html) |
| term | The landing page for one taxonomy’s term | termawesome in tags taxonomy (/tags/awesome/index.html) |
Hugo官方文档: default-taxonomies
丰富section,taxonomy,term展示信息
section
如我们有个posts这样一个section,在content/posts/新建一个_index.md添加如下信息即可:
+++
title = "POSTS"
cover = "https://qiniu.sukoshi.xyz/src/images/68686407_p0.jpg"
description = "记录生活点点点点点点点滴"
+++
taxonomy
如我们有个tags这样一个taxonomy,在content/tags/新建一个_index.md添加如下信息即可:
+++
title = "聚合标签🏷️"
cover = "https://qiniu.sukoshi.xyz/src/images/68135789_p0.jpg"
description = "标签有点多哦~~~"
+++
term
如我们有个摄影这样的一个term,它属于tags这个taxonomy下,则我们在content/tags/摄影/下新建一个_index.md添加如下信息即可:
+++
title = "记录美好生活"
cover = "https://qiniu.sukoshi.xyz/src/images/68135789_p0.jpg"
description = "玩器材的永远不懂摄影 -- 冠希哥"
+++