Skip to content

Conversation

@jorisvandenbossche
Copy link
Member

This adds the "external link" icon to external links in the sidebar. We already have this for the navbar (actually using a specific configuration option to add those, while we could probably also do that through sphinx' toctree, but that's for another PR). But this adds it for the sidebar as well (eg like sphinx-book-theme and furo do as well).

In sphinx-book-theme we explicitly add the icon to the html, like we do for the navbar here as well (using beautifulsoup, see https://github.com/executablebooks/sphinx-book-theme/blob/39aaaa3e4d908fe7be8b7378ad474d8c6b86aa16/sphinx_book_theme/__init__.py#L126-L130). But in this PR I took the approach of Furo to add ::after the link with CSS, but using the same icon/styling we already use in this theme / sphinx-book-theme.

@jorisvandenbossche
Copy link
Member Author

Result:

image

@choldgraf choldgraf merged commit 07198a6 into pydata:master Apr 3, 2021
@choldgraf
Copy link
Collaborator

This sounds like a good idea to use the css approach! Agreed we should do the same for the navbar and remove the custom beautiful soup bits as much as possible

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.

2 participants