-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use doc front matter to customize pagination #5688
Comments
It shouldn't be hard to add. I'm not 100% sure to understand the use-case though. If a doc is already in the sidebar then there's linear navigation in the sidebar already, so why only disable this linear navigation at the bottom of the doc but not in the sidebar? If the doc shouldn't have any linear navigation then hiding both the sidebar + the bottom nav may make sense, in which case the user can use a sidebar doc ref instead? |
The sidebar is not linear; the sidebar is a tree structure. For example, in that Canny request, the OP is doing something like "category: installation; items: Windows, Mac, Linux". In this case, after browsing "Installation > Windows", the user should be taken directly to the next step (e.g. configuration), not "Installation > Mac".
In fact, as I described in #5686, the "home page doc" should have the sidebar but without pagination, hope that makes sense |
Makes sense, agree we should add this. Does it make sense to also allow arbitrary links for next/previous? (I still think that we should handle a "docId" shortcut because it's likely the most common use-case, supporting an object syntax in yaml can be supported later anyway) |
I just propose we use doc IDs as next/previous :P Makes the implementation / validation so much easier. We can allow arbitrary links later maybe, but IMO it doesn't make much sense |
Agree, let's keep it simple for now, as long as we keep the ability to improve later without breaking changes |
🚀 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
The text was updated successfully, but these errors were encountered: