feat(docs): add section pager (disable by default)

Disable docs prev/next pager unless `docs_section_pager = true` in
`params.toml`.

Requires setting `sections_weight = 01` in front matter of docs pages to
control the order of their appearance in the prev/next links. Otherwise,
prev/next links are generated by Hugo based on chronological date order
- which will be an invalid order in the case of docs.

See https://github.com/gohugoio/hugo/issues/2494
This commit is contained in:
George Cushen committed 2019-05-02 00:31:07 +01:00
1 parent 1e9bcd1dcb
commit 9eb5c0727d
1 file changed
+2
+2
View File
@@ -37,9 +37,11 @@
{{ partial "tags.html" . }}
{{ if site.Params.docs_section_pager }}
<div class="article-widget">
{{ partial "section_pager.html" . }}
</div>
{{ end }}
</div>
<div class="body-footer">