Add Default Navigation To Ghostium

I just started using Ghost Blog and I really loved it.

While tinkering with the themes and trying Ghostium, I noticed the custom navigation menu had hardcoded links, thus missing the default navigation items (the ones added from administration panel).

If you would like to add them gracefully, you can fix them with the help of documentation .

To do that, you can move partials/custom/navigation.hbs to partials/navigation.hbs and add a foreach loop. I added the navigation list between Home and Subscribe to Feed links, surrounded by a divider.

  • The modified file: /var/www/ghost/content/themes/ghostium/partials/navigation.hbs
<li class="drawer-list-item">  
  <a href="/" data-pjax>
    <i class="fa fa-home"></i>Home
  </a>
</li>

<li class="drawer-list-divider"></li>

{{#foreach navigation}}
<li class="drawer-list-item">  
  <a href="{{url absolute="true"}}" data-pjax>
    <i class="fa fa-pencil"></i>{{label}}
  </a>
</li>  
{{/foreach}}

<li class="drawer-list-divider"></li>

<li class="drawer-list-item">  
  <a href="{{@blog.url}}/rss/">
    <i class="fa fa-rss"></i>Subscribe to Feed
  </a>
</li>  


  • Don't forget to alter partials/drawer.hbs to read the new one.
<button data-action="open-drawer" id="drawer-button" class="drawer-button"><i class="fa fa-bars"></i></butt  
<nav tabindex="-1" class="drawer">  
  <div class="drawer-container">
    <!--.drawer-search(role="search")-->
    <ul role="navigation" class="drawer-list">
      {{navigation}}
    </ul>
  </div>
</nav>  

Comments

comments powered by Disqus