-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
docs: Add new tableOfContent script #6667
Conversation
✅ Deploy Preview for label-studio-docs-new-theme ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for heartex-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Can we remove the empty TOC box if there are no headings? e.g. https://deploy-preview-6667--label-studio-docs-new-theme.netlify.app/guide/glossary |
GAH! Yes, updated. Hadn’t see that use case - thank you |
Replace hexo
toc
helper with our owntableOfContent
to fix page rendering when the heading levels are in the wrong order (e.g.h3
beforeh2
)Testing
These page should render normally now:
https://deploy-preview-6667--label-studio-docs-new-theme.netlify.app/tags/timeseries
https://deploy-preview-6667--label-studio-docs-new-theme.netlify.app/templates/generative-pairwise-human-preference
Also fixed where the toc wasn’t showing if there was no
<h2>
:https://deploy-preview-6667--label-studio-docs-new-theme.netlify.app/tags/table
Other pages should show the toc same as before:
https://deploy-preview-6667--label-studio-docs-new-theme.netlify.app/guide/storedata