question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use doc front matter to customize pagination

See original GitHub issue

🚀 Feature

An option to hide specific pagination buttons, and repoint pagination links to other doc pages.

Have you read the Contributing Guidelines on issues?

Yes

Has this been requested on Canny?

https://docusaurus.io/feature-requests/p/allow-for-non-linear-navigation kind of points to this

Motivation

To allow for non-linear navigation; also related to #5686 because this will be used home pages where navigation doesn’t make sense

API Design

  • pagination_next: my-doc (a doc ID)
  • pagination_prev: my-doc
  • pagination_next: null (disable pagination)
  • pagination_prev: null

Have you tried building it?

Yes, using swizzling and adding CSS to hide pagination; but repointing links would require editing on the plugin side

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
slorbercommented, Oct 13, 2021

Agree, let’s keep it simple for now, as long as we keep the ability to improve later without breaking changes

0reactions
Josh-Cenacommented, Oct 13, 2021

Does it make sense to also allow arbitrary links for next/previous?

I just propose we use doc IDs as next/previous 😛 Makes the implementation / validation so much easier. We can allow arbitrary links later maybe, but IMO it doesn’t make much sense

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pagination — Eleventy
To iterate over a data set and create pages for individual chunks of data, use pagination. Enable in your template's front matter by...
Read more >
Front Matter Reference | BigCommerce Dev Center
Front matter defines which store resources are available to be rendered within a Stencil template. Front matter is declared at the top of...
Read more >
Add a pagination config option for docs. #7661 - GitHub
Add a config option for docs to enable/disable pagination: ... disable_pagination: true or whatever custom frontmatter API you want to use:.
Read more >
Setting two different page numberings in the same Word doc ...
... and Arabic numerals [1,2,3]) for various parts of a single document. ... document for your thesis or dissertation that has front matter...
Read more >
Front Matter - Hugo
You can assign content-specific weight in the front matter of your content. These values are especially useful for ordering in list views. You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found