Kazuhiro MUSASHI
|
746c5079d0
|
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>
```
|
2019-04-14 18:56:42 +08:00 |