HUGO
Menu
GitHub 87548 stars Mastodon

Duration

将这些方法与 time.Duration 值一起使用。

Menu

在遍历菜单项时使用这些方法。

Menu entry

在菜单模板中使用这些方法。

Output format

在 OutputFormat 对象上使用这些方法。

Page

在 Page 对象上使用这些方法。

Pager

在构建分页列表页面的导航时,在 Pager 对象上使用这些方法。

Pages

将这些方法与 Page 对象集合一起使用。

Pre and Post

在此站点配置中,我们启用 表情符号短代码 的渲染,并在每个菜单条目前后添加表情符号短代码: hugo. yaml toml json enableEmoji: true menus: main: - name: About pageRef: /about post: ':point_left:' pre: ':point_right:' weight: 10 - name: Contact pageRef: /contact post: ':arrow_left:' pre: ':arrow_right:' weight: 20 enableEmoji = true [menus] [[menus.main]] name = 'About' pageRef = '/about' post = ':point_left:' pre = ':point_right:' weight = 10 [[menus.main]] name = 'Contact' pageRef = '/contact' post = ':arrow_left:' pre = ':arrow_right:' weight = 20 { "enableEmoji": true, "menus": { "main": [ { "name": "About", "pageRef": "/about", "post": ":point_left:", "pre": ":point_right:", "weight": 10 }, { "name": "Contact", "pageRef": "/contact", "post": ":arrow_left:", "pre": ":arrow_right:", "weight": 20 } ] } } 要渲染菜单:

Resource

将这些方法与全局、页面和远程 Resource 对象一起使用。

Shortcode

在您的 shortcode 模板中使用这些方法。

Time

将这些方法与 time.Time 值一起使用。

分类法

将这些方法与分类法对象一起使用。

站点

将这些方法与站点对象一起使用。