HB 修订模块

描述页面的额外信息,如创建日期、修改日期等。

本页内容

Modulegithub.com/hbstack/revision
Repository⭐ Please consider giving a star if your like it.
Stars
Version
Used by
Requirements
License
UsageSee how to use modules.

模板

模板 hb/modules/revision/index 接受当前页面变量作为上下文。

1{{- partial "hb/modules/revision/index" . }}

站点参数

hugo.toml

1[hb]
2  [hb.revision]
3    created_at = true
4    date_format = ':date_full'
5    font_size = '.825rem'
6    icons = true

hugo.yaml

1hb:
2  revision:
3    created_at: true
4    date_format: :date_full
5    font_size: .825rem
6    icons: true

hugo.json

 1{
 2   "hb": {
 3      "revision": {
 4         "created_at": true,
 5         "date_format": ":date_full",
 6         "font_size": ".825rem",
 7         "icons": true
 8      }
 9   }
10}
NameTypeDefaultRequiredDescription
date_formatstring:date_full-另请参阅 time.Format
iconsbooleantrue-是否显示图标。
font_sizestring.825rem-文本字体大小。
created_atbooleantrue-false 时,隐藏创建日期。