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 badges and icon links to sidebar #285

Closed
chrisjsewell opened this issue Feb 11, 2021 · 1 comment · Fixed by #691
Closed

Add badges and icon links to sidebar #285

chrisjsewell opened this issue Feb 11, 2021 · 1 comment · Fixed by #691
Labels
enhancement New feature or request

Comments

@chrisjsewell
Copy link
Member

chrisjsewell commented Feb 11, 2021

With the alabaster theme I like that you can have badges added to the sidebar (and a description), e.g.

image

See https://github.com/bitprophet/alabaster/blob/master/alabaster/theme.conf for all options

Implementation

The easiest way to do this would be to support the Icon Links functionality from the pydata theme:

@chrisjsewell chrisjsewell added the enhancement New feature or request label Feb 11, 2021
@ErikBjare
Copy link

ErikBjare commented May 10, 2021

You can modify the sidebar yourself by setting html_sidebars.

I discovered that was the case when I migrated from the rtd-theme, since I had it set and it made the sidebar use the old structure.

Example:

# Custom sidebar templates, maps document names to template names.
html_sidebars = {
   "**": ["globaltoc.html", "relations.html", "sourcelink.html", "searchbox.html"],
}

Not sure what you need to set it to to keep the structure used in this theme (with the addition of your badges), but should be easy for you to figure out if you dig through the source :)

@choldgraf choldgraf changed the title Add badges to sidebar (like alabaster) Add badges and icon links to sidebar Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants