Skip to content
Last updated

Control the Previous and Next navigation buttons on project pages.

The navigation option also supports page-level configuration using front matter.

Options

OptionTypeDescription
nextButtonPageLink objectControls the next page button.
previousButtonPageLink objectControls the previous page button.
actionsPageAction objectControls the actions that appear on the page. Requires the seo.llmstxt option to be enabled.
OptionTypeDescription
hidebooleanSpecifies if the navigation link button is hidden. Default false.
textstringText that appears above the navigation buttons. Default value: Next page or Previous page respectively.

Options that apply to front matter only

OptionTypeDescription
labelstringText that appears on the button. The default value is the text of the first heading of the target page.
pagestringPath to a Markdown page in the project, or an URL.

PageAction object

OptionTypeDescription
hidebooleanSpecifies if the page actions are hidden. Default false.

items

[string]

An array of items that appear on the page and their order. Allowed values: copy, view, chatgpt, claude

  • copy - Copy the page content as markdown to the clipboard.
  • view - View the page content as markdown in a new tab.
  • chatgpt - Ask ChatGPT about this page. Only available on public pages.
  • claude - Ask Claude about this page. Only available on public pages.

The first item in the list will be the default action. By default, all items are shown in the following order: copy, view, chatgpt, claude.

Examples

Change navigation buttons text globally

The following example changes text labels of the navigation buttons to Next chapter and Previous chapter respectively. This configuration applies to all pages in the project.

redocly.yaml
navigation:
  nextButton:
    text: "Next chapter"
  previousButton:
    text: "Previous chapter"

The following example hides the navigation buttons on all pages of the project.

redocly.yaml
navigation:
  nextButton:
    hide: true
  previousButton:
    hide: true

Customize navigation buttons in the front matter

The following example creates a custom reading flow. Instead of following the order of pages in the sidebar, navigation buttons direct the user to a page in a different section of the project.

---
navigation:
  nextButton:
    page: ../advanced-topics.md
    text: "Next chapter"
    label: Advanced concepts
  previousButton:
    page: ./docs/basics.md
    text: "Previous chapter"
    label: About basics
---

Disable page actions

The following example disables the page actions on all pages of the project.

navigation:
  actions:
    hide: true

Customize page actions

The following example changes the default order of page actions and disables the claude action.

navigation:
  actions:
    items:
      - chatgpt
      - copy
      - view

Resources

  • Front matter configuration - Configure navigation button options on individual pages using front matter for granular control
  • Configuration options - Explore other project configuration options for comprehensive documentation and platform customization