Merge pull request #50 from cabello/patch-2

Check .Prev and .Next pointers before using it
This commit is contained in:
Steve Francia 2013-08-20 20:54:31 -07:00
commit 6f424175bf

View file

@ -65,8 +65,12 @@ It makes use of [chrome templates](/layout/chrome)
</ul>
</div>
<div>
<a class="previous" href="{{.Prev.Permalink}}"> {{.Prev.Title}}</a>
<a class="next" href="{{.Next.Permalink}}"> {{.Next.Title}}</a>
{{ if .Prev }}
<a class="previous" href="{{.Prev.Permalink}}"> {{.Prev.Title}}</a>
{{ end }}
{{ if .Next }}
<a class="next" href="{{.Next.Permalink}}"> {{.Next.Title}}</a>
{{ end }}
</div>
</aside>