mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Check .Prev and .Next pointers before using it
This commit is contained in:
parent
eff8457ac9
commit
acd5ea0e75
1 changed files with 6 additions and 2 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue