-
Notifications
You must be signed in to change notification settings - Fork 95
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 tocify JS for dynamic TOC [upstream only] #3453
base: master
Are you sure you want to change the base?
Use tocify JS for dynamic TOC [upstream only] #3453
Conversation
6f0bed8
to
95cac8f
Compare
A few tweaks and increased levels of headings. It's actually quite cool! 😎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one suggestion.
guides/common/docinfo.html
Outdated
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> | ||
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tocify/1.9.0/javascripts/jquery.tocify.min.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be cool if we checkin these scripts. They are ~350kb in total which is a lot, but I'd be ok with that.
95cac8f
to
667a96b
Compare
Sourcing the JS libraries locally. And rebased. They have the MIT license - is that compatible with us? I hope I managed to get the JS path correctly. |
<script src="/js/jquery-1.11.3.min.js"></script> | ||
<script src="/js/jquery-ui.min.js"></script> | ||
<script src="/js/jquery.tocify.min.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This JS path should be correct because the same path is used to call /js/nav.js
but the preview isn't working now and I'm not sure why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ekohl Would you be able to help?
What changes are you introducing?
Making the table of contents expandable and collapsible.
Why are you introducing these changes? (Explanation, links to references, issues, etc.)
Improves UX for Foreman Docs.
For long documents, it's more user friendly and we will be able to display level-3 headings.
Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)
Checklists
Please cherry-pick my commits into: