mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-18 18:16:57 -05:00
5fd1e74903
``` git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash ``` Closes #11925
739 B
739 B
In this site configuration we enable rendering of emoji shortcodes, and add emoji shortcodes before (pre) and after (post) each menu entry:
{{< code-toggle file=hugo >}} enableEmoji = true
menus.main name = 'About' pageRef = '/about' post = '👈' pre = '👉' weight = 10
menus.main name = 'Contact' pageRef = '/contact' post = '⬅️' pre = '➡️' weight = 20 {{< /code-toggle >}}
To render the menu:
<ul>
{{ range .Site.Menus.main }}
<li>
{{ .Pre | markdownify }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ .Post | markdownify }}
</li>
{{ end }}
</ul>