How to implement navigation in a static site generator

I would like to create a navigation for a static site that I am building with Assemble .

I currently have a directory pages

and several subdirectories in that directory. I would like to be able to create some sort of hierarchy or structured navigation like:

<ul>
   <li><a href="/about-us/index.html">About Us</a>
      <ul>
        <li><a href="/about-us/sub-page1.html">Sub Page 1</a></li>
        <li><a href="/about-us/sub-page2.html">Sub Page 2</a></li>
        <li><a href="/about-us/sub-page3.html">Sub Page 3</a></li>
      </ul>
   </li>
</ul>

      

Is there a preferred way to do this without hardlinking all of my pages?

+3
gruntjs handlebars.js assemble


source to share


No one has answered this question yet

Check out similar questions:

five
How do I include various partial pieces of content in an assembly based on the dev / build context?
five
Build (static site generator) with Angular JS
4
grunt-processhtml Define the file count variable
2
How do I extend the Visual Studio Web Publishing Pipeline?
2
Navigating with an assembly
2
Assemble preliminary draft (plus Yeoman and Grunt) in development without rebuilding
1
Using the same filenames in the assembly, which calls the compiled static templates
1
How can I conditionally add the Handlebars parts to the build layout?
0
Grunt assembly does not generate static page
0
the structure of the output directory in the assembly



All Articles
Loading...
X
Show
Funny
Dev
Pics