diff --git a/_config.yml b/_config.yml index 871167cb..75cb861c 100644 --- a/_config.yml +++ b/_config.yml @@ -32,19 +32,6 @@ google_verify: # https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here bing_verify: -# Links to include in top navigation -# For external links add external: true -links: - - title: About - url: /about/ - - title: Posts - url: /posts/ - - title: Theme Setup - url: /theme-setup/ - - title: Made Mistakes - url: http://mademistakes.com - external: true - # http://en.wikipedia.org/wiki/List_of_tz_database_time_zones timezone: America/New_York future: true diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 00000000..e4f0ba95 --- /dev/null +++ b/_data/navigation.yml @@ -0,0 +1,13 @@ +# Site navigation links + +- title: About + url: /about/ + +- title: Sample Posts + url: /posts/ + +- title: Theme Setup + url: /theme-setup/ + +- title: Made Mistakes + url: http://mademistakes.com \ No newline at end of file diff --git a/_includes/_navigation.html b/_includes/_navigation.html index 6e3bbc5d..cad7599c 100644 --- a/_includes/_navigation.html +++ b/_includes/_navigation.html @@ -5,9 +5,14 @@ <div class="top-navigation"> <nav role="navigation" id="site-nav" class="nav"> <ul> - {% for link in site.links %} - <li><a href="{% if link.external %}{{ link.url }}{% else %}{{ site.url }}{{ link.url }}{% endif %}" {% if link.external %}target="_blank"{% endif %}>{{ link.title }}</a></li> - {% endfor %} + {% for link in site.data.navigation %} + {% if link.url contains 'http' %} + {% assign domain = '' %} + {% else %} + {% assign domain = site.url %} + {% endif %} + <li><a href="{{ domain }}{{ link.url }}" {% if link.url contains 'http' %}target="_blank"{% endif %}>{{ link.title }}</a></li> + {% endfor %} </ul> </nav> </div><!-- /.top-navigation -->