我在这里

🏠 HOME 🗂️ DOCS 🔗 LINK 👴🏻 ABOUT

如何丰富Banner信息

2021-06-23 09:52

  • doc

在文章页里,在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 = "玩器材的永远不懂摄影 -- 冠希哥"
+++

i18n多语言配置

2021-06-22 17:51

Sukoshi

Sukoshi

不觉得鹿角即可爱又有攻击性吗(

Related Posts

  • i18n多语言配置
  • Front Matter 相关参数说明
  • config.toml配置
  • 播放音频与视频,shortcode使用说明
  • 插入公式,图片与Widget目录显示

Categories

  • 笔记 20
  • 归档记录 9
  • 碎碎念 8
  • QAQ 7
  • doc 6
  • mv 3
show all

Tags

摄影 日常 js 浪 mongodb 日记 碎碎念 canvas cos css git github
show all

© 2022 Sukoshi.

蜀ICP备15014309号

Powered by Hugo Theme - kagome

🌞 light 🌛 dark 🤖️ auto