From 10e959d7aa2e85254c28f767e5cd3ab0cf7a9aa0 Mon Sep 17 00:00:00 2001
From: Pat Dryburgh <hello@patdryburgh.com>
Date: Sun, 12 Aug 2018 15:07:39 -0700
Subject: [PATCH] improve navigation

---
 _data/menu.yml      | 3 ---
 _includes/menu.html | 7 ++++++-
 _layouts/post.html  | 6 +++++-
 _sass/_menu.scss    | 3 +++
 4 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/_data/menu.yml b/_data/menu.yml
index fe49d29..682e631 100644
--- a/_data/menu.yml
+++ b/_data/menu.yml
@@ -1,6 +1,3 @@
-- title: Home
-  url: /
-
 - title: About
   url: /about.html
 
diff --git a/_includes/menu.html b/_includes/menu.html
index c99d039..93ad502 100644
--- a/_includes/menu.html
+++ b/_includes/menu.html
@@ -3,8 +3,13 @@
 {% if menu %}
   <nav class="site-navigation">
     <ul>
-    {% for item in site.data.menu %}
       <li>
+        <a href="{{ '/' | prepend: site.baseurl }}">
+          Home
+        </a>
+      </li>
+    {% for item in site.data.menu %}
+      <li {% if page.url == item.url %}class="active"{% endif %}>
         {% if item.url contains 'http' %}
           <a href="{{ item.url }}">
             {{ item.title }}
diff --git a/_layouts/post.html b/_layouts/post.html
index 01dc651..097dde2 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -2,7 +2,11 @@
 layout: default
 ---
 
-{% include back-link.html %}
+{% if site.data.menu %}
+  {% include menu.html %}
+{% else %}
+  {% include back-link.html %}
+{% endif %}
 
 <article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
 
diff --git a/_sass/_menu.scss b/_sass/_menu.scss
index 1be70ef..7fc70e6 100644
--- a/_sass/_menu.scss
+++ b/_sass/_menu.scss
@@ -14,6 +14,9 @@
   font-size: .875em;
   font-variant: small-caps;
   margin: 0;
+  &.active a {
+    text-decoration: underline;
+  }
 }
 
 .site-navigation a {