-
-
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
Added support for anchors on sidebar #349
Added support for anchors on sidebar #349
Conversation
I have added the support to add anchors on sidebar throught the sidebars.json file. I have added an optional key “anchors” for each category. The anchors key must be an array of string where each string is an anchor. The next step is to make this compatible with i18n.
@marcosvega91 Thank you very much for this pull request. I need to get a release out with some bug fixes, but I will review this right afterwards. |
Added getAnchors method that check if metadata has anchors property because it is defined only for docs and not for blogs
Hi @JoelMarcey thanks for your time. Today I have fixed a bug that caused the failing of tests. Now I would improve my code |
@marcosvega91 Hi! Did you want me to review this PR as it is? Or were you planning any other changes/improvements? |
Hi @JoelMarcey I would like to add the support for translation for the anchors, but in these days I didn't have so much time |
Hi @marcosvega91! If you're still interested in working on this we now have autogenerated anchors from the document headings. Check out #474 and #475. You can use the |
Hi @marcosvega91 @microbouji - Just to be clear - |
@marcosvega91 How is it going with the planned changes/improvements? Let us know how you can help! If you have less time these days to work on it, it's totally ok, just let us know and we can take it from here. |
Closing due to inactivity. Feel free to reopen. |
Motivation
Hi, i like this project and so I have decided to improve the docusaurus functionality implementing the one suggested by @JoelMarcey.
Test Plan
I haven't completed the feature yet. It works now but I have to add support for i18n and add some styles.
I have added an option key for each category into the sidebar.json called anchors. This key is an array of anchors. The anchors are saved as metadata inside metadata.js and then they will be rendered into sidebar as an ul list inside category (image below) .
Related PRs