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
ENH: add the theme version in the footer #1000
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice, thanks! A couple quick thoughts but it generally looks good
src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html
Outdated
Show resolved
Hide resolved
src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html
Outdated
Show resolved
Hide resolved
<a href="https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html"> | ||
Pydata-sphinx-theme | ||
</a> | ||
{{ theme_version }}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we put this in a little span element in case people want to style it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the whole thing is encapsulated in a p
element with the theme-version
class isn't it sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you prefer not to have the span, it's fine w me. I tend to wrap everything that is "semantically different" from anything else in its own class but that is maybe overkill 😅
In the future if somebody really wants it they will ask for it and we can consider adding it in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong opinion on this one, I simply copied the structure of the sphinx-version.html
template.
If you want I can add a span to both or keep it as it is
…heme-version.html Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops - noticed one more thing
src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html
Outdated
Show resolved
Hide resolved
…heme-version.html Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just merge it in and iterate from there - thanks for this improvement!
Fix #990
I looked at what other themes were doing and as suggested in the issue, a lot of them are using
To do that I should have overwritten the sphinx-version component entirely which is not the route taken by the theme where all the components displayed in the footer are independent. So I created a specific component that can be added to the footer.
it displays as such and can be set independently from the Sphinx version: