Skip to content

BUG: external links empty entries #66

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

Closed
jorisvandenbossche opened this issue Dec 21, 2019 · 4 comments · Fixed by #68
Closed

BUG: external links empty entries #66

jorisvandenbossche opened this issue Dec 21, 2019 · 4 comments · Fixed by #68

Comments

@jorisvandenbossche
Copy link
Member

In the pandas docs we get something like:

image

@jorisvandenbossche
Copy link
Member Author

This is a strange issue. So if the external_links config option is an empty list (the default), then it actually iterates twice but without text/url.

Even when adding something like {% if theme_external_links|length > 0 %} around it, it passes that check. So somehow the empty list becomes non-empty.

@jorisvandenbossche
Copy link
Member Author

Apparently you can solve this by explicitly putting this config option in conf.py:

html_theme_options = {
    "external_links": [],
    ...
}

but why the default external_links = [] in theme.conf doesn't work, no idea.

@choldgraf
Copy link
Collaborator

Ah I think the issue is with Sphinx reading in the default configuration as a two-item list of names: "[" and "]".

@jorisvandenbossche
Copy link
Member Author

Ah, good find :)

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 a pull request may close this issue.

2 participants