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> <a href="/">Main</a>
</span> </span>
<span class="nav-item"> <span class="nav-item">
<a href="/#about">About</a> <a href="/#about">About</a>
</span> </span>
{{ with .Section }}
<span class="nav-item"> <span class="nav-item">
<a href="/{{ .Section }}">Back to {{ .Section }}</a> <a href="/{{ . }}">Back to {{ . }}</a>
</span> </span>
{{ end }}
<span class="nav-item"> <span class="nav-item">
<a href="/#contact">Contact</a> <a href="/#contact">Contact</a>
</span> </span>
@ -25,4 +27,4 @@
{{ end }} {{ end }}
</div> </div>
</nav> </nav>
<hr> <hr>