I think light should be {{ default_mode }}, because it adds data-theme="light" attribute to the html tag which overrides the data-mode="dark" attribute.
In my case, I added html_context = {"default_mode": "dark"} to conf.py. In the static source, data-mode="dark" is added to the html tag, but the theme is still light. In the developer tools, a new data-theme="light" is added to the html tag where the cause is above inline script.
Hi,
In
https://github.com/pydata/pydata-sphinx-theme/blob/a135c205ef95524760b278482affe0ce4a6302df/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/layout.html#L17
I think
light
should be{{ default_mode }}
, because it addsdata-theme="light"
attribute to thehtml
tag which overrides thedata-mode="dark"
attribute.In my case, I added
html_context = {"default_mode": "dark"}
toconf.py
. In the static source,data-mode="dark"
is added to thehtml
tag, but the theme is still light. In the developer tools, a newdata-theme="light"
is added to thehtml
tag where the cause is above inline script.