Fix issue 38 - Dont generate link back to section if page does not have a section (#39)

This commit is contained in:
Pablo Martin Viva 2018-03-31 16:41:32 -03:00 committed by Vicky Lai
parent f2024bb2a4
commit 633e1e3d4a

View file

@ -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>
@ -25,4 +27,4 @@
{{ end }}
</div>
</nav>
<hr>
<hr>