website: [Docs Bug π report]: Automate the Prev and UpNext buttons for Docs
Describe the bug you found in AsyncAPI Docs.
Every time we update the docs or add a new doc inside documentation, we have to add Up Next
and Back
buttons for each page or update them to the latest. Make the buttons in such a way that it automates itself to point to next and back pages sequentially according to the Doc tree.
Remove the DocsButton
component from each Doc page and add the component to the DocsLayout
, and implement it according to the index
of the map function used.
Attach any resources that can help us understand the issue.
Use the weight parameter to serialize the docs and then provide the routes to the buttons for each page.
Code of Conduct
- I agree to follow this projectβs Code of Conduct
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 31 (31 by maintainers)
This appears to be a common question in the internet π β¦ lots of blog posts and StackOverflow threads mention it
Perhaps this can help?
@derberg @alequetzalli what if we make an object of posts copied/calculated using the DocsNav
tree
object, add prev and next fields using previous and next elements respectively, and then pass it as post to the component?hey folks, IMHO we need 2 mechanisms:
wdyt?
@manavdesai27 @alequetzalli I have updated the issue description according to the need. Kindly look into it.
well, I didnβt say it must stay like this π redirects were done for people linking to AsyncAPI website from outside. I just explained why it works π this link should definitely be fixed in the markdown file.
@manavdesai27 is super motivated to do both issue, so let us leave
hacktoberfest
tag. There are still 2 weeks to go.@manavdesai27 okay you take this one.
Hey @akshatnema this is actually 3 different bugs listed under one issueβ¦ Can you at least create 3 tasks in this same issue to help make it more digestible? πππ½ I also recommend thinking of a new title that better encapsulates the 3 items you discuss. ππ½ππ½
As for adding Prev/Next buttons on each content bucket
/Overview
pages, I think thatβs a great idea π‘ . I am ok with a contributor adding them and I assume that Lukasz prob is too. (altho yes, I should never assume π)