-
-
Save ergoz/c1d2b4691af1540f0445483c28d5548e to your computer and use it in GitHub Desktop.
Hugo recursive partial to output navigation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
languages: | |
en: | |
menu: | |
main: | |
- identifier: menu_home | |
name: "Home" | |
url: "/home/" | |
weight: 10 | |
- identifier: menu_about | |
name: "About" | |
url: "/about/" | |
weight: 20 | |
- identifier: menu_about_team | |
name: "Team" | |
url: "/about/team/" | |
weight: 10 | |
parent: menu_about | |
- identifier: menu_about_careers | |
name: "Careers" | |
url: "/about/careers/" | |
weight: 20 | |
parent: menu_about | |
- identifier: menu_contact | |
name: "Contact" | |
url: "/contact/" | |
weight: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<div id="nav"> | |
<ul> | |
<li><a href="http://localhost:1313/home/">Home</a></li> | |
<li> | |
<a href="http://localhost:1313/about/">About</a> | |
<ul> | |
<li><a href="http://localhost:1313/about/team/">Team</a></li> | |
<li><a href="http://localhost:1313/about/careers/">Careers</a></li> | |
</ul> | |
</li> | |
<li><a href="http://localhost:1313/contact/">Contact</a></li> | |
</ul> | |
</div> | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment