Skip to content

Make nav creation more accessible for non-technical people #4

Description

@chadokruse

Automatically generate nav from pages?

{% assign pages = site.pages | sort:"weight"  %}
<ul>
  {% for p in pages %}
    <li>
      <a {% if p.url == page.url %}class="active"{% endif %} href="{{ site.baseurl }}{{ p.url }}">
        {{ p.name }}
      </a>
    </li>
  {% endfor %}
</ul>

Decent overview: https://thinkshout.com/blog/2014/12/creating-dynamic-menus-in-jekyll/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions