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

👌 Add external link icon to external links in sidebar #365

Merged
merged 2 commits into from
Apr 3, 2021

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.

None yet

2 participants