Просмотр исходного кода

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
George Cushen 6 лет назад
Родитель
Сommit
9eb5c0727d
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      layouts/partials/docs_layout.html

+ 2 - 0
layouts/partials/docs_layout.html

@@ -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">