Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/content/docs/guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,33 @@ params:
height: 20
```

### Pagination

Hextra can render previous/next navigation at the bottom of content pages (docs and blog articles) to help readers move between pages in the same section. You can control this independently for docs pages and blog articles.

Docs pages pagination:

```yaml {filename="hugo.yaml"}
params:
page:
# Control prev/next navigation on docs pages
# true (default): show prev/next when neighbors exist
# false: hide prev/next on docs pages
displayPagination: false
```

Blog article pagination:

```yaml {filename="hugo.yaml"}
params:
blog:
article:
# Control prev/next on blog articles only
# true (default): show prev/next when neighbors exist
# false: hide prev/next on blog pages
displayPagination: false
```

## Sidebar

### Main Sidebar
Expand Down
2 changes: 2 additions & 0 deletions layouts/docs/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
{{ .Content }}
</div>
{{ partial "components/last-updated.html" . }}
{{- if (site.Params.page.displayPagination | default true) -}}
{{ partial "components/pager.html" . }}
{{- end -}}
{{ partial "components/comments.html" . }}
</main>
</article>
Expand Down
2 changes: 2 additions & 0 deletions layouts/docs/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
{{ .Content }}
</div>
{{ partial "components/last-updated.html" . }}
{{- if (site.Params.page.displayPagination | default true) -}}
{{ partial "components/pager.html" . }}
{{- end -}}
{{ partial "components/comments.html" . }}
</main>
</article>
Expand Down