shithub: hugo

Download patch

ref: 6f424175bfc9faa1c7153523ba460b09f1cd7a7e
parent: 3d0dc1acb1089022172f61ed65f6002f3fdb9780
parent: acd5ea0e75cc577c55b80e40fc26ed7c2b66ea63
author: Steve Francia <[email protected]>
date: Tue Aug 20 16:54:31 EDT 2013

Merge pull request #50 from cabello/patch-2

Check .Prev and .Next pointers before using it

--- a/docs/content/layout/content.md
+++ b/docs/content/layout/content.md
@@ -65,8 +65,12 @@
         </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>