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

Set dropdown_link to [] by default #36

Merged
merged 3 commits into from
Feb 17, 2023
Merged

Conversation

Mandrenkov
Copy link
Collaborator

Context:

Presently, if the hover ToC option is specified, at least one left navbar link must be specified. If no links are specified, Sphinx fails to build the documentation with an error such as:

Theme error:
An error happened in rendering the page api/xanadu_sphinx_theme.
Reason: UndefinedError("'dropdown_link' is undefined")

Description of the Change:

  • Defined the dropdown_link Jinja variable to be the empty list if no left navbar links are specified.

Benefits:

  • The Xanadu Sphinx Theme is fully compatible with projects that require Jinja2 == 3.0.0.

Possible Drawbacks:

  • None

Related GitHub Issues:

Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Mandrenkov! Looks good to me

@Mandrenkov Mandrenkov merged commit 9a9ee1b into master Feb 17, 2023
@Mandrenkov Mandrenkov deleted the always-define-dropdown-link branch February 17, 2023 16:37
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.

Option toc_hover=False raises Theme error
2 participants