Previous and Next buttons (Doks Theme)

Hello,

Is there any way to remove the “Previous” button when I’m on the first page of a main section (persuasion playbook)? (See pic.)

Similarly, when I get to the final page of that section, can I direct the the “Next” button to go to the first page of the Writing section from the main header?

thanks!

Without more detail (preferably a link to your Github repo), it will be near impossible to help you.

ah yes, sorry. GitHub - Mushroom-Daemon/doks: copy playbook

Please raise the question with the theme author. They are in the best position to answer your questions.

1 Like

Is there any way to remove the “Previous” button when I’m on the first page of a main section (persuasion playbook)? (See pic.)

Clear Hugo’s cache by running —for example:

npx shx rm -rf public resources hugo_stats.json

I guess, then it should work for you:

Similarly, when I get to the final page of that section, can I direct the the “Next” button to go to the first page of the Writing section from the main header?

Copy node_modules@thulite/doks-core/layouts/partials/main/docs-navigation.html and paste as layouts/partials/main/docs-navigation.html.

In the latter, update line 4 from:

	{{ $pages := where site.RegularPages "Section" .Section -}}

to:

	{{ $pages := where site.RegularPages "Section" "in" site.Params.doks.sectionNav -}}

In config/_default/params.toml you’ve set:

# Doks (@thulite/doks-core)
[doks]
  # Nav
  sectionNav = ["docs", "writing", "portfolio"] # ["docs"] (default) or list of sections (e.g. ["docs", "guides"])

So, now it should work:

Note, for Doks specific questions there’s Doks Discussions

1 Like

thank you!