Skip to content

Commit

Permalink
data
Browse files Browse the repository at this point in the history
  • Loading branch information
alxdhuang committed Mar 27, 2019
1 parent 49523c9 commit 269db4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions _data/navigation.yml
@@ -0,0 +1,4 @@
- name: Home
link: /
- name: About
link: /about.html
11 changes: 5 additions & 6 deletions _includes/navigation.html
@@ -1,8 +1,7 @@
<nav>
<a href="/" {% if page.url == "/" %}style="color: red;"{% endif %}>
Home
</a>
<a href="/about.html" {% if page.url == "/about.html" %}style="color: red;"{% endif %}>
About
</a>
{% for item in site.data.navigation %}
<a href="{{ item.link }}" {% if page.url == item.link %}style="color: red;"{% endif %}>
{{ item.name }}
</a>
{% endfor %}
</nav>

0 comments on commit 269db4f

Please sign in to comment.