-
Notifications
You must be signed in to change notification settings - Fork 253
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: support tabs #576
docs: support tabs #576
Conversation
Hey @henryiii , I hope you don't mind I had a tinker with this, thought I'd try using the markdown 'admonition' syntax, which is like !!! tab "tab name"
tab content
!!! tab "tab name"
tab content Then it's transformed into tabs with jQuery. What do you think? I also had a go at some styling, not 100% sure about that yet but there's something there. To get those code snippets working inside the tabs, I also managed to get the styling of the superfences extension working (the problem before was that it was doing pygments highlighting, which wasn't supported by the theme we're using, which uses highlightjs) |
Looks good! I can rebase and tweak a bit, then look at what else can be tabbified. Not sure if we need it, but can this do "grouped" tabs, where all matching tabs change if one changes? That could be possibly useful for the options examples, perhaps; you could select "travis" and all the examples of options change to the travis tab. |
I've tried to unify on the same order for the CI listing, I've made the list of examples at the top of the options page tabbed (and added Gitlab CI, which was missing), and reordered/updated the original tabs to better reflect the current examples |
I really like the tabbed options example. https://cibuildwheel--576.org.readthedocs.build/en/576/options/#setting-options :) |
@joerick Extra important to |
This is a rough draft example of what tabs would look like. I've applied it to one place (GHA example), and the implementation is highly manual and not reusable, so will need to be improved if we want to go this way (@joerick might be able to be a lot more elegant at this than me :), or maybe there's a built-in tool somewhere (though I think we would need to support super fences, which we don't yet). Previously mentioned here: #567 (comment)
Thoughts? Visit the RtD PR check to view the docs, setup page. I've recently added tabs here: https://packaging.python.org/tutorials/packaging-projects/#configuring-metadata (though that was in sphinx).