Merge commit '7125ad401ad043e46262afc7eca8dceb6d54bb9e'

This commit is contained in:
Bjørn Erik Pedersen
2024-01-26 08:22:42 +01:00
141 changed files with 904 additions and 813 deletions

View File

@@ -15,18 +15,18 @@ Use the `Children` method when rendering a nested menu.
With this site configuration:
{{< code-toggle file=hugo >}}
[[menu.main]]
[[menus.main]]
name = 'Products'
pageRef = '/product'
weight = 10
[[menu.main]]
[[menus.main]]
name = 'Product 1'
pageRef = '/products/product-1'
parent = 'Products'
weight = 1
[[menu.main]]
[[menus.main]]
name = 'Product 2'
pageRef = '/products/product-2'
parent = 'Products'

View File

@@ -15,18 +15,18 @@ Use the `HasChildren` method when rendering a nested menu.
With this site configuration:
{{< code-toggle file=hugo >}}
[[menu.main]]
[[menus.main]]
name = 'Products'
pageRef = '/product'
weight = 10
[[menu.main]]
[[menus.main]]
name = 'Product 1'
pageRef = '/products/product-1'
parent = 'Products'
weight = 1
[[menu.main]]
[[menus.main]]
name = 'Product 2'
pageRef = '/products/product-2'
parent = 'Products'

View File

@@ -14,13 +14,13 @@ The `Identifier` method returns the `identifier` property of the menu entry. If
[automatically]: /content-management/menus/#define-automatically
{{< code-toggle file=hugo >}}
[[menu.main]]
[[menus.main]]
identifier = 'about'
name = 'About'
pageRef = '/about'
weight = 10
[[menu.main]]
[[menus.main]]
identifier = 'contact'
name = 'Contact'
pageRef = '/contact'

View File

@@ -12,13 +12,13 @@ action:
In this menu definition, the second entry does not contain an `identifier`, so the `Identifier` method returns its `name` property instead:
{{< code-toggle file=hugo >}}
[[menu.main]]
[[menus.main]]
identifier = 'about'
name = 'About'
pageRef = '/about'
weight = 10
[[menu.main]]
[[menus.main]]
name = 'Contact'
pageRef = '/contact'
weight = 20

View File

@@ -5,7 +5,7 @@ categories: []
keywords: []
action:
related: []
returnType: hugolib.pageState
returnType: page.Page
signatures: [MENUENTRY.Page]
---
@@ -14,15 +14,15 @@ Regardless of how you [define menu entries], an entry associated with a page has
In this menu definition, the first two entries are associated with a page, the last entry is not:
{{< code-toggle file=hugo >}}
[[menu.main]]
[[menus.main]]
pageRef = '/about'
weight = 10
[[menu.main]]
[[menus.main]]
pageRef = '/contact'
weight = 20
[[menu.main]]
[[menus.main]]
name = 'Hugo'
url = 'https://gohugo.io'
weight = 30

View File

@@ -12,21 +12,21 @@ action:
When you define menu entries [in site configuration] or [in front matter], you can include a `params` key to attach additional information to the entry. For example:
{{< code-toggle file=hugo >}}
[[menu.main]]
[[menus.main]]
name = 'About'
pageRef = '/about'
weight = 10
[[menu.main]]
[[menus.main]]
name = 'Contact'
pageRef = '/contact'
weight = 20
[[menu.main]]
[[menus.main]]
name = 'Hugo'
url = 'https://gohugo.io'
weight = 30
[menu.main.params]
[menus.main.params]
rel = 'external'
{{< /code-toggle >}}

View File

@@ -12,19 +12,18 @@ action:
With this menu definition:
{{< code-toggle file=hugo >}}
[menu]
[[menu.main]]
[[menus.main]]
name = 'Products'
pageRef = '/product'
weight = 10
[[menu.main]]
[[menus.main]]
name = 'Product 1'
pageRef = '/products/product-1'
parent = 'Products'
weight = 1
[[menu.main]]
[[menus.main]]
name = 'Product 2'
pageRef = '/products/product-2'
parent = 'Products'

View File

@@ -7,14 +7,14 @@ In this site configuration we enable rendering of [emoji shortcodes], and add em
{{< code-toggle file=hugo >}}
enableEmoji = true
[[menu.main]]
[[menus.main]]
name = 'About'
pageRef = '/about'
post = ':point_left:'
pre = ':point_right:'
weight = 10
[[menu.main]]
[[menus.main]]
name = 'Contact'
pageRef = '/contact'
post = ':arrow_left:'