pydata-sphinx-theme
pydata-sphinx-theme copied to clipboard
Variable `html_theme_options:logo` incompatible with Sphinx `_static` Logic
(This issue addresses what seems to be a separate problem from the related discussion here: https://github.com/pydata/pydata-sphinx-theme/issues/1328#issuecomment-1619521455)
Irregardless of the path I use for the logo: image_light
theme variable:
source/_static/logo/logo_light.svg
./_static/logo/logo_light.svg
logo/logo_light.svg
../../_build/html/_static/logo/logo_light.svg
the builder always ends up looking for the file at:
_static/logo_light.svg
This file, however, won't ever exist - since Sphinx (as per the documentation) copies the subdirectories of the _static directory:
docs/
├── source/
│ ├── _static/
│ | └── logo/
| | ├── logo_light.svg
│ | └── logo_dark.svg
│ └── index.md
└── conf.py
docs/
└── build/
└── html/
└── _static/
└── logo/
├── logo_light.svg
└── logo_dark.svg
The way the theme is presently set up won't allow for sub-directories of the _static
directory. since the theme variable seems to be incompatible with the logic that Sphinx uses to copy subdirectories of the _static
directory to _build
.
If I understand the comments of @12rambau correctly, the expected (and Sphinx-compatible) behaviour would be that the path passed to the logo: image_light
variable should be relative to the _build/html/_static
directory.
For convenient testing, I added a MWE to this repo: michaelweinold/mwe_sphinx
...I might add that this seemingly does not affect the output of a readthedocs build (for some weird reason).