We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a1e789 commit 42d9399Copy full SHA for 42d9399
src/pydata_sphinx_theme/pygments.py
@@ -99,5 +99,6 @@ def overwrite_pygments_css(app: Sphinx, exception=None):
99
100
# re-write pygments.css
101
pygments_css = Path(app.builder.outdir) / "_static" / "pygments.css"
102
- with pygments_css.open("w") as f:
103
- f.write(get_pygments_stylesheet(light_theme, dark_theme))
+ # Ensure the _static folder exists for all builders
+ pygments_css.parent.mkdir(exist_ok=True)
104
+ pygments_css.write_text(get_pygments_stylesheet(light_theme, dark_theme))
0 commit comments