Skip to content

Add New Astropy Theme#48

Merged
astrofrog merged 11 commits intoastropy:mainfrom
Cadair:sunpy-astropy-theme
Apr 13, 2026
Merged

Add New Astropy Theme#48
astrofrog merged 11 commits intoastropy:mainfrom
Cadair:sunpy-astropy-theme

Conversation

@Cadair
Copy link
Copy Markdown
Member

@Cadair Cadair commented Jan 21, 2026

This PR adds the new theme.

You can see built documentation with this theme in the following places:

]
],
["Documentation",
[
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment I have just linked the coordinated packages here. We need to decide if we want to list all affiliated packages or not.

As you can see on https://sunpy.org it's possible to have collapsible sections here, so we could choose to put all the affiliated packages under a click to reveal list.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should also be noted that by default if we list all the affiliated packages here they will also be included in the unified search results (as long as they are hosted on RTD).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should restrict ourselves to coordinated packages for now

["Team", "team.html", 2],
]
rtd_extra_search_projects = [["astropy-org-test", "https://astropy-org-test.readthedocs.io"]]
footer_links = [["Code of Conduct", "code_of_conduct.html", 2]] No newline at end of file
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment I have only put the CoC in the footer.

The footer on astropy.org is quite different before this theme so we might want to customize the footer further.

@Cadair Cadair force-pushed the sunpy-astropy-theme branch from 85a6026 to 60c11e5 Compare January 21, 2026 16:29
@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Jan 21, 2026

This PR adds the new theme, it is built on top of #47 actual diff is here

If you make the base branch the #47 then it all cleans up here, and once that one is merged will be fall back on main. It's a rather nice and convenient recent(ish) GH feature.

@Cadair
Copy link
Copy Markdown
Member Author

Cadair commented Jan 21, 2026

I didn't realise you could do that unless the base branch was on the upstream repo. I'll have a look!

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Jan 21, 2026

I didn't realise you could do that unless the base branch was on the upstream repo

Ah, maybe you are right and we could only do that as I cannot convince my team to use fork-based development 🙄

@Cadair Cadair mentioned this pull request Jan 21, 2026
3 tasks
Cadair added a commit to Cadair/astropy-sphinx-theme that referenced this pull request Jan 22, 2026
This brings it closer to astropy#48 as well
@Cadair Cadair force-pushed the sunpy-astropy-theme branch 3 times, most recently from 4a43cd6 to e35f7e4 Compare January 22, 2026 10:09
["specreduce", "https://specreduce.readthedocs.io", 3],
["specutils", "https://specutils.readthedocs.io", 3],
]
],
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs.astropy.org has a learn link in the header, would we like to add one here?

@Cadair Cadair force-pushed the sunpy-astropy-theme branch from e35f7e4 to e71c421 Compare January 22, 2026 14:29
@Cadair
Copy link
Copy Markdown
Member Author

Cadair commented Jan 22, 2026

(The CI is failing because of GitHub flakiness)

@Cadair Cadair marked this pull request as ready for review January 22, 2026 15:03
Comment thread pyproject.toml Outdated
@pllim
Copy link
Copy Markdown
Member

pllim commented Jan 22, 2026

For the astropy core, the upper banner gets confusing for me. Say, I am in "latest" (dev version doc) and then I click this:

Screenshot 2026-01-22 174330

And suddenly I am in stable doc. If I am not careful, I would think I am still in "latest" and then chaos ensues.

@pllim
Copy link
Copy Markdown
Member

pllim commented Jan 22, 2026

Also it's way too much orange even though Erik T would probably like it given astropy/astropy#15111

@mhvk
Copy link
Copy Markdown

mhvk commented Jan 23, 2026

Just a quick note that I find the new theme quite pleasant -- but then, I've grown up in NL so like the colour orange ...

@Cadair
Copy link
Copy Markdown
Member Author

Cadair commented Jan 23, 2026

For the astropy core, the upper banner gets confusing for me. Say, I am in "latest" (dev version doc) and then I click this:

I don't think there's an easy way to fix this problem and it doesn't seem to me that it's going to be a big problem?

@pllim
Copy link
Copy Markdown
Member

pllim commented Jan 23, 2026

big problem

Maybe I am outlier but I work with astropy almost exclusively in the dev version, and I confused myself in the first few mins navigating that menu.

@Cadair
Copy link
Copy Markdown
Member Author

Cadair commented Jan 24, 2026

That's really interesting to me, I'd never use that menu to get back to the documentation homepage, but now you've said it I can see people doing it. For what it's worth nobody has ever complained about doing this with the sunpy docs 🤷

I've opened this: sunpy/sunpy-sphinx-theme#308 I hope you don't consider this a blocking issue 🙈

@Cadair
Copy link
Copy Markdown
Member Author

Cadair commented Jan 24, 2026

Also it's way too much orange

In that there's too many occurrences of the colour orange or that the orange is too orange? Also light theme or dark? I haven't put a lot of effort into the colouring yet, so I'm happy to tweak things some. However, I also don't have a load of time to prod around with CSS if I want to get this rolled out to all the packages within budget.

@pllim
Copy link
Copy Markdown
Member

pllim commented Jan 26, 2026

sunpy/sunpy-sphinx-theme#308

Thanks! I don't think it is blocking.

orange

Also non-blocking. Just an observation. Marten seems happy with it.

@neutrinoceros
Copy link
Copy Markdown

this looks great. I love the improved discoverability !

@Cadair Cadair force-pushed the sunpy-astropy-theme branch from e1efc98 to 04e07bc Compare April 8, 2026 08:18
@Cadair
Copy link
Copy Markdown
Member Author

Cadair commented Apr 8, 2026

I've now cut a sunpy release, could we merge this and get this released? We can hopefully make further incremental changes easily?

@pllim
Copy link
Copy Markdown
Member

pllim commented Apr 8, 2026

I'll defer the decision to @astrofrog or @bsipocz . I have no objection. Thanks!

@Cadair
Copy link
Copy Markdown
Member Author

Cadair commented Apr 8, 2026

I'm also happy to help maintain this package going forward, as half of it is now a thin wrapper on sunpy-sphinx-theme.

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Apr 8, 2026

No objections from me.

Copy link
Copy Markdown
Member

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, minor comments below

@@ -0,0 +1,11 @@
:root {
/* SunPy Theme Colors */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this say Astropy?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The meaning (clearly not that obvious) is that these are the colour variables used by the sunpy theme.

]
],
["Documentation",
[
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should restrict ourselves to coordinated packages for now

Comment thread astropy_sphinx_theme/astropy-unified/theme.toml Outdated
@astrofrog astrofrog merged commit 644288e into astropy:main Apr 13, 2026
6 checks passed
@Cadair Cadair deleted the sunpy-astropy-theme branch April 13, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants