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

Fix error during linkcheck when trying to write pygments.css #2097

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

s-weigand
Copy link

Hi there, I'm currently changing our docs to use your nice theme 😄

However, our CI fails during lickcheck since the parent folder where the theme tries to write pygments.css to does not exist during link checking.

Extension error (pydata_sphinx_theme.pygments):
Handler <function overwrite_pygments_css at 0x7f93feb0e4d0> for event 'build-finished' threw an exception (exception: [Errno 2] No such file or directory: '/home/runner/work/pyglotaran-extras/pyglotaran-extras/docs/_build/linkcheck/_static/pygments.css')
make: *** [Makefile:25: linkcheck] Error 2
make: Leaving directory '/home/runner/work/pyglotaran-extras/pyglotaran-extras/docs'

My workaround on our side is to create the expected parent path for linkcheck in our conf.py which lets the CI pass again.

This error didn't surface here for 2 reasons:

s-weigand added a commit to glotaran/pyglotaran-extras that referenced this pull request Jan 18, 2025
It is 2025 and I'm tired of getting flash banged by our docs 😅
While the RTD theme served us for a long time, they do not offer a dark theme version.
Whereas the [`pydata` theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html) offers both light and dark themes as well as a more modern look in general.

While working on this I found a bug when running the link checker so I added a workaround here and opened a [PR upstream](pydata/pydata-sphinx-theme#2097) to fix it.

### Change summary

- [📚🎨 Change docs theme from RTD to pydata](a85457a)
- [📚🎨🩹 Fix mermaid edge and marker (arrow head) color in darkmode](9eb459a)
- [📚✨ Add interrogate badge](3650143)
- [🚇🩹 Workaround to fix pydata_sphinx_theme error on linkcheck](f5b35f9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant