-
Notifications
You must be signed in to change notification settings - Fork 339
Re-order the theme template structure to be closer to sphinx-basic-ng
#577
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
Comments
I am fully supportive of this reorganization. Even if we never migrate to |
Generally +1 on better standardizing / structuring our templates!
Do you mean the html div with pydata-sphinx-theme/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/layout.html Lines 39 to 40 in 370fa47
(because I don't see that we have a banner template file?) Changing that would break users though. In general, changing the names of templates is also in theory a breaking change? (I think a downstream user can eg have a layout.html where they also refer to our templates?) |
Yep - though I wasn't able to find a place where we make it possible to actually use that banner. So I think this would be more like "activating" that feature in the first place, rather than breaking existing functionality.
In theory yes. We wouldn't change the That said, it would be a breaking change for people who are pretty tech savvy (who are able to over-ride Sphinx templates on their own) so I'd hope the impact could be minimized. |
I have merged #619 a few minutes ago, so let's close this one now! |
@damianavila I think this one is not quite yet done - we've refactored the SCSS, but the theme's HTML structure is still the same. I think the IMO there are still two things that need to happen:
|
Update the top comment with these steps! |
This one was addressed by #662, so closing this one now. |
Description
(for this issue I'm defining
sections
as major areas of the theme UI, andcomponents
as subsets of HTML within those sections)Currently, our HTML template structure is a bit haphazard, we have:
_templates
folder that mostly has component templatesIt's a bit hard to figure out what template should be in the root, and what should be in the
_templates
folder. We also don't follow any kind of standard naming convention for our sections. This makes our theme more idiosynchratic to contribute to and maintain.Proposal
We could adopt the same template naming and structure conventions that the
sphinx-basic-ng
theme uses. This would be something like:Moreover it would mean naming our major UI sections the same as the
sphinx-basic-ng
, so for example our "navbar" would be renamed tosections/header.html
and our "banner" would be renamed tosections/announcement.html
.This would standardize our theme structure a bit more, and is another baby step towards directly using the
sphinx-basic-ng
theme as an ancestor if we wish.Implementation guide
Note that this would also break a lot of pre-existing PRs, so we might want to merge those first before doing work here if we want to do this.
Tasks
The text was updated successfully, but these errors were encountered: