-
Notifications
You must be signed in to change notification settings - Fork 29
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
[Epic] Switch to Furo Sphinx theme #232
Milestone
Comments
Eric-Arellano
changed the title
[WIP issue description] Qiskit-ify the Furo Sphinx theme
[Epic] Finish Qiskit-ifying the Furo Sphinx theme
Apr 13, 2023
Eric-Arellano
changed the title
[Epic] Finish Qiskit-ifying the Furo Sphinx theme
[Epic] Switch to Furo Sphinx theme
May 3, 2023
Eric-Arellano
added a commit
that referenced
this issue
May 3, 2023
This PR adds a private `_qiskit_furo` theme to `qiskit_sphinx_theme`, using Sphinx's inheritance mechanism. That allows us to build `example_docs` with Furo by using `THEME=_qiskit_furo tox -e py`. The Furo theme still has some CSS issues, documented in #232. But I'd like to land this theme and make those improvements in followup PRs. That will make it easier for people (like Digital) to collaborate on improving this theme, and it will make reviews more focused on the specific CSS fix. > using Sphinx's inheritance mechanism This is much more maintainable than vendoring all the Furo code in our repository. For HTML template overrides, we add the comments `<!-- QISKIT CHANGE: start. ... -->` and `<!-- QISKIT CHANGE: end. -->` to make clear our changes. We also put substantial changes in dedicated HTML Jinja template files, then use `{% include "..." %}`. That will make it easier to sync with upstream Furo. ## Web components We duplicate the same top-nav-bar.js file for both Pytorch and Furo. This is because Sphinx requires the file to be in the `static/` folder for both themes. We can't put it in a common folder. Using symlinks to copy the file in didn't work either due to Python packaging. We use a Jest test to ensure that the two files are in sync.
I tried building the Qiskit-Experiments docs with the current Furo theme (as of 97f2029) and here are some points I noted so far:
|
Eric-Arellano
added a commit
that referenced
this issue
Jun 30, 2023
Unblocks #232. With this PR, users will be able to set `html_theme = "qiskit"` to use Furo. This PR adds instructions about how to migrate. It also switches the default theme in `qiskit_sphinx_theme`'s example docs to `qiskit`. 95% of my work this month has been on Furo, so that's a better default. ## Reminder: `qiskit_ecosystem` theme upcoming Once we add the Ecosystem theme, only Qiskit itself should use the `qiskit` theme. In the meantime, everyone should migrate from `qiskit_sphinx_theme` to `qiskit` (barring migration issues).
Qiskit has been using Furo for a few weeks now 🎉 https://qiskit.org/documentation/ |
This was referenced Sep 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background
Moving away from Pytorch
There are two categories of problems with our current Sphinx theme, a fork of Pytorch:
User limitations
Developer frustrations
Rather than trying to salvage the current theme, we are recommending using a new, more modern theme from https://sphinx-themes.org/. The newer ones are built to follow best practices like use Sass and have excellent mobile support.
Furo
We are recommending using Furo: https://sphinx-themes.org/sample-sites/furo/. It was built in 2020 for the new pip docs and is used by Black, urllib3, attrs, and the Python developer guide.
It meets all of our criteria, including looking modern, having great mobile support, being extensible to Qiskit's top-nav bar, and having maintainable Sass-based CSS.
We also strongly considered Book: https://sphinx-themes.org/sample-sites/sphinx-book-theme/. But it's top-nav bar would be much harder to get working with the Qiskit one, and we also believe it's not as nice-looking.
The text was updated successfully, but these errors were encountered: