WIP: Add an astropy theme which is a re-configured sunpy-sphinx-theme#93
WIP: Add an astropy theme which is a re-configured sunpy-sphinx-theme#93Cadair wants to merge 6 commits intoastropy:mainfrom
Conversation
| def setup(app: Sphinx): | ||
| # Register theme | ||
| theme_dir = Path(__file__).parent.resolve() | ||
| app.add_html_theme("astropy", theme_dir) |
There was a problem hiding this comment.
Can we be a bit more specific on the theme name? Otherwise, if we want to switch again in the future, it might get confusing.
sphinx-astropy/sphinx_astropy/conf/v1.py
Line 259 in e77825c
There was a problem hiding this comment.
Got any suggestions? Calling it sunpy-astropy sounds terrible 😜
There was a problem hiding this comment.
You should have moved it to OpenAstronomy! :p
Is astropy-v3-theme also confusing? Naming is hard.
There was a problem hiding this comment.
calling it openastronomy makes the most sense; even if the package itself if not being moved.
There was a problem hiding this comment.
Calling what openastronomy?
There was a problem hiding this comment.
The best thing to do might be to move the astropy theme to it's own package as then we can version it properly. Then if we want to rewrite it in a decade we can have v2.0.0 of the theme package?
FWIW we did have a theme package before the current one: https://github.com/astropy/astropy-sphinx-theme
There was a problem hiding this comment.
OK, before I go much further here I would like to get a 👍 from you all for the following plan:
I propose to move this micro-theme from this PR into astropy-sphinx-theme, under the name "astropy", and then release v2 of that package (optionally deprecating the old theme). This would mean that package would provide two themes, i.e. if you install it you can set html_theme = "astropy" or html_theme = "bootstrap-astropy". If we want to make major changes to the "astropy" theme, we can control that with major versions of that package, or make a "astropy-v2" in the future if needed.
As a prerequisite to that, I will have to do some cleanup of the now very crufty astropy-sphinx-theme repo, and I'll add a doc build to preview the themes etc.
There was a problem hiding this comment.
Wouldn't it be cleaner as a new theme package? I still think just "astropy" is too vague as theme name.
There was a problem hiding this comment.
Making a whole new repo with a new theme which is ~100 lines of code and config seems extreme when we already have a repo named "astropy-sphinx-theme"?
|
Do you plan to have a proof-of-concept PR over at astropy using this one? |
Yeah though I'll probably use a repo which takes less than a week to build the docs to start off with. |
|
This is now replaced by astropy/astropy-sphinx-theme#48 and #94 |
See my Cycle 5 FR for more details on the whole project.
This PR will add a new sphinx theme to this repo, which customises the defaults of the sunpy-sphinx-theme and adds a nominal v3 config to use it, although with any luck all it will contain is
html_theme = "astropy".