Skip to content
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

Update documentation to use sphinx-immaterial theme #1311

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

msimberg
Copy link
Contributor

@msimberg msimberg commented Nov 1, 2024

The current theme, sphinx-material, isn't very actively developed: bashtage/sphinx-material#141. The author even suggests using sphinx-immaterial: https://github.com/jbms/sphinx-immaterial. This PR updates the documentation to use sphinx-immaterial, but relies on jbms/sphinx-immaterial#338 at the moment for some newer features.

A few improvements:

  • automatic dark mode (as well as manual override)
  • interactive search
  • (nicer) version-added roles (available in vanilla sphinx/rst, but the look better with sphinx-immaterial)
  • generally slightly more polished style and responsive

I've also changed all the logos in the Acknowledgements to pngs, optimized them, and added a white background to the ETHZ logo (it was previously an svg with transparent background, leading to black text on black background in dark mode).

@msimberg msimberg self-assigned this Nov 1, 2024
docs/conf.py Outdated Show resolved Hide resolved
docs/conf.py Show resolved Hide resolved
Copy link

codacy-production bot commented Nov 1, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.03% (target: -1.00%) (target: 90.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (8f08551) 18282 13806 75.52%
Head commit (18d8f87) 18282 (+0) 13801 (-5) 75.49% (-0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1311) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@msimberg
Copy link
Contributor Author

msimberg commented Nov 1, 2024

To view the documentation locally, download the artifact created in the "Documentation" workflow (see workflow for a link), extract the archive, and serve it e.g. with python -m http.server --directory <extracted-dir>. You can also simply open index.html from the archive, but e.g. search won't work unless served with a webserver.

docs/requirements.txt Outdated Show resolved Hide resolved
@msimberg msimberg force-pushed the sphinx-immaterial branch 2 times, most recently from 8e9dc26 to 9d8cbfb Compare November 7, 2024 15:14
@msimberg msimberg marked this pull request as ready for review November 7, 2024 15:16
@msimberg
Copy link
Contributor Author

msimberg commented Nov 7, 2024

Given that it's easy to use the unreleased version of sphinx-immaterial, and the official documentation only needs to build successfully in exactly one environment, I think it's relatively safe to rely on the unreleased version. I've pushed some final cleanups to this branch so it's ready to be reviewed.

@msimberg msimberg merged commit b252c0b into pika-org:main Nov 12, 2024
37 checks passed
@msimberg msimberg deleted the sphinx-immaterial branch November 12, 2024 16:06
@msimberg msimberg added this to the 0.31.0 milestone Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant