Jekyll Plugin to add extra classes to active links
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Jekyll Link Plugin

This is a Jekyll plugin that generates links with additional classes if link href attribute is a part of a path of the current page.

This plugin will be very userful if you want to apply some additioinal styles to links that point out the current page.

About link for Russians


Place a link.rb file in your plugins/ dir.


Plase this code in template:

  {% link /contacts/ Contacts %}

It will be converted into this HTML on any page exepct contacts:

  <a href="/contacts/">Contacts</a>

Extra class will be added in attributes on the contacts page:

  <a href="/contacts/" class="current">Contacts</a>

Parent links will be marked with current class too. For example we have to pages /about and subpage /about/author and template like this:

     {% link /about/ About %}
       <li>{% link /about/author Author %}

On the /about/author all links will be generated as this:

     <a href="/about/" class="current">About</a>
       <li><a href="/about/author" class="current">Author</a>