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


source to share





All Articles