Skip to content

Conversation

@Cadair
Copy link
Member

@Cadair Cadair commented Jan 19, 2026

You can see a preview of this here: https://astropy-org-test.readthedocs.io/ (where the search works) and also in the circle ci build artifacts.

Fun things to checkout:

  • light and dark themes
  • the search!!

I think this is now ready for review, but please confine review to the diff in this PR. i.e. not the theme which should be reviewed here: astropy/astropy-sphinx-theme#48


HTML Pages left to port:

  • announcements/*.html
  • contribute.html
  • credits.html
  • team.html
  • paper1_10k_citations.html

Todo before merge:

  • Find someone with power to move the astropy.org domain to RTD
  • Add back Google Analytics, and start a discussion somewhere about improvements later
  • Merge theme PR and release astropy-sphinx-theme

Other potential improvements:

  • Use intersphinx for all links to core documentation
  • See if we can generate a dark theme variant of the home page background

@Cadair Cadair force-pushed the unified-theme-rewrite branch from 4b2fc98 to af49c3f Compare January 19, 2026 16:49
@Cadair
Copy link
Member Author

Cadair commented Jan 19, 2026

I'll keep a list of things I think we could tidy up here as I go along:

  • We should get rid of all the affiliated package javascript and have sphinx just do all the page gen on build. Then cronjob the site to rebuild each day or week or something.
  • The Copy bibtex js on the citation page inlines all the bibtex which is just horrible, we should have sphinx read that in from somewhere sane. What is the canonical source of the citation bibtex?
  • The javascript for the team page should all be removed and replaced with build-time Python code.

@Cadair Cadair force-pushed the unified-theme-rewrite branch from cfe1821 to d7ee958 Compare January 19, 2026 20:05
@Cadair Cadair force-pushed the unified-theme-rewrite branch from cf5fe56 to 3c1bb51 Compare January 20, 2026 15:00
@Cadair Cadair force-pushed the unified-theme-rewrite branch from 18ebffe to d351274 Compare January 20, 2026 17:13
@Cadair Cadair force-pushed the unified-theme-rewrite branch from d351274 to d4640ba Compare January 20, 2026 17:17
@Cadair

This comment was marked as outdated.

@Cadair Cadair marked this pull request as ready for review January 20, 2026 17:20
@Cadair Cadair changed the title WIP: Rewrite to a sphinx project and use unified theme Rewrite to a sphinx project and use unified theme Jan 20, 2026
@pllim
Copy link
Member

pllim commented Jan 20, 2026

You will have to pull this change in too after it is merged. FYI

@Cadair
Copy link
Member Author

Cadair commented Jan 21, 2026

@astropy/astropy-website-maintainers This is now ready for review.

sphinx
myst-parser
sphinx-design
astropy-sphinx-theme@git+https://github.com/Cadair/astropy-sphinx-theme@sunpy-astropy-theme
Copy link
Member Author

Choose a reason for hiding this comment

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

We should probably cut a release of astropy-sphinx-theme before merging this PR 😉

Copy link
Member

Choose a reason for hiding this comment

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

Can you pls cross link PR from that branch here for future reference? Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

It's in the PR description above.

Copy link
Member

Choose a reason for hiding this comment

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

Oh right, nevermind. We cannot merge until this is resolved. I better block merge given the approval.

@pllim
Copy link
Member

pllim commented Jan 21, 2026

This is now ready for review

Shouldn't I wait for you to resolve #698 (comment) first?

@Cadair
Copy link
Member Author

Cadair commented Jan 21, 2026

This is now ready for review

Shouldn't I wait for you to resolve #698 (comment) first?

No, I don't think so. This PR is not about the theme it's about rewriting the astropy.org site to use sphinx. Comments about the theme should go on the theme PR.

@hamogu
Copy link
Member

hamogu commented Jan 21, 2026

Now for the record: I'm not a maintainer of this repro because I have deep experience with web development, it's because we used to manually update the list of affiliated packages in this repro and I was the affiliated package editor at the time (and are again now, though we know how've a difference mechanism).
@eteq is the person who usually reviews changes like this.

That said, I'll have a look as soon as I can.

Copy link
Member

@hamogu hamogu left a comment

Choose a reason for hiding this comment

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

Most of the changes are pretty straightforward changes for html->rst. I'm not saying that to diminish @Cadair 's work (I know it's still a lot of work to do that, but it's not conceptually hard), just to say that the review is basically "it works" and there is no need to review every changed line, because we would not want to include any changes in the wording of individual pages here anyway.
Otherwise, it's a pretty standard setup and I see no problems with it.

Comment on lines +3 to +6
// Quirk to note: the jQuery.getJSON function fails if you open this locally
// with Chrome, because Chrome thinks local JSON files are unsafe for some
// reason. Use basically any other modern browser, or it works fine if its
// actually on the web server even with chrome.
Copy link
Member

Choose a reason for hiding this comment

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

Not really important here, since this is just a comment anyway, but I think most modern browsers now refuse to load any local file for security - for testing locally you'll a local web server running for all or most of them.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah this comment is pretty old 😆

I'd like to purge this entire file of js if I have the time.

@pllim
Copy link
Member

pllim commented Jan 22, 2026

You have to resolve conflict to pick up #699 . Thanks!

@Cadair
Copy link
Member Author

Cadair commented Jan 27, 2026

Merged in main

@Cadair
Copy link
Member Author

Cadair commented Jan 27, 2026

Looks like that's a circleci problem, the way that circleci previews somethings doesn't really work properly. If you look at the RTD preview it seems to work.

@pllim
Copy link
Member

pllim commented Jan 27, 2026

Thanks for the clarification. I hope you are right...

@pllim
Copy link
Member

pllim commented Jan 27, 2026

So this is good to merge or are we waiting on something else?


- store_artifacts:
path: /root/project
path: /home/circleci/project/_build/html
Copy link
Member

Choose a reason for hiding this comment

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

You say we would use RTD preview going forward, right? Do we need this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Arguably not, the main reason I added it was because it was already configured.

I do find that it's nice to have a "real" CI platform checking the build works in addition to RTD however.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Can you please add comment to explain what this is for, for future reference?

Copy link
Member

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Also... Don't we also use some sort of banner mechanism here that "talks" with astropy cord RTD, like when we announced the 10k citation stuff. Would that still work?

sphinx
myst-parser
sphinx-design
astropy-sphinx-theme@git+https://github.com/Cadair/astropy-sphinx-theme@sunpy-astropy-theme
Copy link
Member

Choose a reason for hiding this comment

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

Oh right, nevermind. We cannot merge until this is resolved. I better block merge given the approval.

@Cadair
Copy link
Member Author

Cadair commented Jan 27, 2026

So this is good to merge or are we waiting on something else?

There's a todo list in the OP, but mostly it's blocked on people reviewing / approving / arguing about colours on the theme PR.

Copy link
Member

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Waiting for sunpy theme release

@Cadair
Copy link
Member Author

Cadair commented Jan 27, 2026

Also... Don't we also use some sort of banner mechanism here that "talks" with astropy cord RTD, like when we announced the 10k citation stuff. Would that still work?

Yes, but I should actually make this site display the banner if it's active!

@Cadair
Copy link
Member Author

Cadair commented Jan 27, 2026

Oh the other reason this shouldn't be merged at the moment is that it would break astropy.org in its current state. We need to figure out how to do the RTD migration, which needs someone to make (adopt?) the RTD project with an official hat on, and then to know who has the DNS power.

@pllim
Copy link
Member

pllim commented Jan 27, 2026

RTD migration

I have the power if CoCo7 let me.

DNS power

You have to hunt down @eteq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants