-
-
Notifications
You must be signed in to change notification settings - Fork 20
WIP: Add an astropy theme which is a re-configured sunpy-sphinx-theme #93
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| html_theme = 'bootstrap-astropy' |
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.
Got any suggestions? Calling it sunpy-astropy sounds terrible 😜
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.
You should have moved it to OpenAstronomy! :p
Is astropy-v3-theme also confusing? Naming is hard.
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.
calling it openastronomy makes the most sense; even if the package itself if not being moved.
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.
Calling what openastronomy?
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"?
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.
you have my 👍
|
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".