Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chadokruse opened this issue Apr 21, 2016 · 0 comments
Open

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

chadokruse opened this issue Apr 21, 2016 · 0 comments
Projects

Comments

@chadokruse
Copy link
Member

chadokruse commented Apr 21, 2016

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
Backlog
Development

No branches or pull requests

1 participant