Socket
Book a DemoInstallSign in
Socket

jekyll-navigation

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jekyll-navigation

0.0.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

Navigation for Jekyll

This gem provides Jekyll tags to render navigation lists.

  • generates Twitter Bootstrap compatible html markup
  • supports 2 separate navigation layers (root + sub)
  • supports ordering

example]

Example Usage

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>

Installation

With Bundler

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)

Plain gem

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'

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

Licencse

See LICENSE.txt

FAQs

Package last updated on 07 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.