Skip to content

Commit

Permalink
Fix issue 38 - Dont generate link back to section if page does not ha…
Browse files Browse the repository at this point in the history
…ve a section (#39)
  • Loading branch information
pmviva authored and Vicky Lai committed Mar 31, 2018
1 parent f2024bb commit 633e1e3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions layouts/partials/nav-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
<a href="/">Main</a>
</span>
<span class="nav-item">
<a href="/#about">About</a>
<a href="/#about">About</a>
</span>
{{ with .Section }}
<span class="nav-item">
<a href="/{{ .Section }}">Back to {{ .Section }}</a>
</span>
<a href="/{{ . }}">Back to {{ . }}</a>
</span>
{{ end }}
<span class="nav-item">
<a href="/#contact">Contact</a>
</span>
Expand All @@ -25,4 +27,4 @@
{{ end }}
</div>
</nav>
<hr>
<hr>

0 comments on commit 633e1e3

Please sign in to comment.