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

Improve handling of style variable in template. #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

b-fein
Copy link

@b-fein b-fein commented Apr 6, 2024

The style variable is missing in Sphinx 7. Instead, it now uses a list of styles [1]. This new list was already added in Sphinx 5.1. It looks like the style was only removed in Sphinx 7, though.

This commit updates the layout.html template to define the styles variable if it is missing. This makes the change compatible with both Sphinx <5.1 and versions later than that.

This change is enough to make our documentation buildable with Sphinx 7 when using this theme.

[1] https://www.sphinx-doc.org/en/master/development/templating.html#styles

The `style` variable is missing in Sphinx 7. Instead, it now uses a list
of `styles` [1]. This new list was already added in Sphinx 5.1. It looks
like the `style` was only removed in Sphinx 7, though.

This commit updates the `layout.html` template to define the styles
variable if it is missing. This makes the change compatible with both
Sphinx <5.1 and versions later than that.

[1] https://www.sphinx-doc.org/en/master/development/templating.html#styles
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