From 9eb5c0727ddc92ea1c9a45b5dce91629446204a9 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Thu, 2 May 2019 00:31:07 +0100 Subject: [PATCH] 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 --- layouts/partials/docs_layout.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/partials/docs_layout.html b/layouts/partials/docs_layout.html index d76e074d..ba3d2f35 100644 --- a/layouts/partials/docs_layout.html +++ b/layouts/partials/docs_layout.html @@ -37,9 +37,11 @@ {{ partial "tags.html" . }} + {{ if site.Params.docs_section_pager }}
{{ partial "section_pager.html" . }}
+ {{ end }}