This gem provides Jekyll tags to render navigation lists.
In example-jekyll-site/
folder you'll find a complete jekyll project with navigation example.
Navigation is generated from the basic pages:
contact.md
digital_art.md
imprint.md
index.md
portfolio.md
traditional_art.md
Excerpt from example-jekyll-site/layouts/default.html
:
<div class="row">
<div class="navbar">
<div class="navbar-inner">
<ul class="nav">
{% navigation root %}
</ul>
</div>
</div>
</div>
{% if_navigation sub %}
<div class="row">
<ul class="nav nav-pills">
{% navigation sub %}
</ul>
</div>
{% endif_navigation %}
Rendered example output example-jekyll-site/_site/digital_art.html
:
<div class="row">
<div class="navbar">
<div class="navbar-inner">
<ul class="nav">
<li><a href="./index.html">home</a></li>
<li class='active'><a href="./portfolio.html">portfolio</a></li>
<li><a href="./contact.html">contact</a></li>
</ul>
</div>
</div>
</div>
<div class="row">
<ul class="nav nav-pills">
<li class='active'><a href="./digital_art.html">digital</a></li>
<li><a href="./traditional_art.html">traditional</a></li>
</ul>
</div>
Add this line to your application's Gemfile:
gem 'jekyll-navigation'
And then execute:
$ bundle
You'll need this plugin to load the Gemfile gems in Jekyll:
# _plugins/bundler.rb
require 'bundler/setup'
Bundler.require(:default)
You can also use this gem by install it yourself as:
$ gem install jekyll-navigation
Then add this plugin:
# _plugins/navigation.rb
require 'jekyll-navigation'
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Copyright 2014 dpree. See LICENSE.txt