0.0
No commit activity in last 3 years
No release in over 3 years
Easy menu creation with YAML data
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

= 3.1.2
 Project Readme

jekyll-menu Build Status Gem Version

Easy menu creation with YAML data

Work in progress! Stay tuned. πŸ€“

Usage

Example menu.yml file _data/menus/example.yml

- title: Home
  link: "/"
- title: Blog
- title: Seed
  link: "http://developer.helpscout.net/seed/"
- title: Contact

Example markup in your .html or .md file

{% assign menu = page.menu.example %}
<ul class="{{ menu.class }}">
{% for item in menu.items %}
  <li class="{{ item.class }}">
    <a href="{{ item.link }}" class="{{ item.link_class }}">{{ item.title }}</a>
  </li>
{% endfor %}
</ul>

Compiles to…

<ul class="c-menu">
  <li class="c-menu__item is-active">
    <a href="/" class="c-menu__link is-acitve">Home</a>
  </li>
  <li class="c-menu__item">
    <a href="/blog" class="c-menu__link">Blog</a>
  </li>
  <li class="c-menu__item">
    <a href="http://developer.helpscout.net/seed/" class="c-menu__link">Seed</a>
  </li>
  <li class="c-menu__item">
    <a href="/contact" class="c-menu__link">Contact</a>
  </li>
</ul>

πŸ™Œ