Skip to content

Instantly share code, notes, and snippets.

@nsbingham
Created July 15, 2015 18:04
Show Gist options
  • Save nsbingham/e4a98eb5e37ffc1ad5f7 to your computer and use it in GitHub Desktop.
Save nsbingham/e4a98eb5e37ffc1ad5f7 to your computer and use it in GitHub Desktop.
Example of active state navigation in Jekyll
<nav class="masthead-nav">
<a class="{% if page.title == "About" %}active {% endif %}tooltipped tooltipped-s" href="{{ site.baseurl }}/about" aria-label="About this site.">About</a>
<a class="{% if page.title == "Process" %}active {% endif %}tooltipped tooltipped-s" href="{{ site.baseurl }}/process" aria-label="Working with us.">Process</a>
<a class="{% if page.title == "Capabilities" %}active {% endif %}tooltipped tooltipped-s" href="{{ site.baseurl }}/capabilities" aria-label="What we can do.">Capabilities</a>
<a class="{% if page.title == "Team Docs" %}active {% endif %}tooltipped tooltipped-s" href="{{ site.baseurl }}/team-docs" aria-label="How we do what we do.">Team Docs</a>
<a class="{% if page.title == "Project Leads" %}active {% endif %}tooltipped tooltipped-s" href="{{ site.baseurl }}/project-leads" aria-label="Who's leading your project?">Project Leads</a>
</nav>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment