Change the Labs section's pagination to be within the section:
```
--- a/layouts/labs/single.html
+++ b/layouts/labs/single.html
@@ -21,11 +21,11 @@
</main>
<nav class="pagination">
- {{ if .Next }}
- <span class="previous">← <a href="{{ .Next.Permalink }}" rel="prev">{{ .Next.Title }}</a></span>
+ {{ with .PrevInSection }}
+ <span class="previous">← <a href="{{ .Permalink }}" rel="prev">{{ .Title }}</a></span>
{{ end }}
- {{ if .Prev }}
- <span class="next"><a href="{{ .Prev.Permalink }}" rel="next">{{ .Prev.Title }}</a> →</span>
+ {{ with .NextInSection }}
+ <span class="next"><a href="{{ .Permalink }}" rel="next">{{ .Title }}</a> →</span>
{{ end }}
</nav>
```
This commit is contained in:
parent
e7f7fa7efd
commit
746c5079d0
@ -21,11 +21,11 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
<nav class="pagination">
|
<nav class="pagination">
|
||||||
{{ if .Next }}
|
{{ with .PrevInSection }}
|
||||||
<span class="previous">← <a href="{{ .Next.Permalink }}" rel="prev">{{ .Next.Title }}</a></span>
|
<span class="previous">← <a href="{{ .Permalink }}" rel="prev">{{ .Title }}</a></span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .Prev }}
|
{{ with .NextInSection }}
|
||||||
<span class="next"><a href="{{ .Prev.Permalink }}" rel="next">{{ .Prev.Title }}</a> →</span>
|
<span class="next"><a href="{{ .Permalink }}" rel="next">{{ .Title }}</a> →</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user