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 值一起使用。
分類法
將這些方法與分類法對象一起使用。
站點
將這些方法與站點對象一起使用。