docs/content/en/configuration/page.md
{{% glossary-term "default sort order" %}}
Hugo uses the default sort order to determine the next and previous page relative to the current page when calling these methods on a Page object:
Next and PrevNextInSection and PrevInSectionThis is based on this default project configuration:
{{< code-toggle config=page />}}
nextPrevInSectionSortOrder
: (string) The sort order used to determine the next and previous page within the same section when calling NextInSection or PrevInSection on a Page object. Valid values are asc (ascending) or desc (descending). Default is desc.
nextPrevSortOrder
: (string) The sort order used to determine the next and previous page when calling Next or Prev on a Page object. Valid values are asc (ascending) or desc (descending). Default is desc.
To reverse the meaning of next and previous:
{{< code-toggle file=hugo >}} [page] nextPrevInSectionSortOrder = 'asc' nextPrevSortOrder = 'asc' {{< /code-toggle >}}
[!NOTE] These settings do not apply to the
NextorPrevmethods on aPagesobject.