Skip to content

Conversation

@willingc
Copy link
Contributor

@willingc willingc commented Jul 31, 2025

References and relevant issues

Closes #801

Description

This PR makes the following changes:

  • updates announcement url to use github content
  • fix a trailing comma in the version_switcher.json that local build was erroring on
  • fix an invalid pygments import statement
  • updates app-model intersphinx urls to https

Testing

I wasn't sure a good way to test the version switcher with PRs. Checked the pydata sphinx theme repo but their CI seems to also redirect to live versions.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 31, 2025
@willingc willingc changed the title Update announcement Update announcement and version switcher Jul 31, 2025
@TimMonko
Copy link
Contributor

Has 2 banner headers, which I thought we turned off at one point. But I might not be used to it, given that I guess its been quietly broken for a while?
image

<!-- This will appear in the announcement banner at the top of the site.
It needs to be activated by passing the link:
"https://napari.org/dev/_static/announcement.html"
"https://raw.githubusercontent.com/napari/docs/main/docs/_templates/announcement.html",
Copy link
Contributor

@TimMonko TimMonko Jul 31, 2025

Choose a reason for hiding this comment

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

Can you explain to me this change? I don't understand why its different

in part because I don't see an announcment html in the _templates

Copy link
Contributor Author

@willingc willingc Jul 31, 2025

Choose a reason for hiding this comment

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

Ugh. Because I pulled the was moving the announcement.html into _templates where it belongs since it is currently in _static. And then I changed my mind. I will update the comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed my mind again and am moving announcements.html into _templates to be consistent with pydata sphinx themes approach

@willingc
Copy link
Contributor Author

@TimMonko Check out the pydata sphinx theme docs for examples of two banners. We could style the colors with css.

@TimMonko TimMonko added this to the 0.6.3 milestone Jul 31, 2025
@TimMonko
Copy link
Contributor

Thanks! Excited to have the banner back.
It trips me up so often to see I'm on like 0.4.18

@TimMonko TimMonko merged commit b8fc6dd into napari:main Jul 31, 2025
11 of 12 checks passed
@willingc willingc deleted the update-announcement branch July 31, 2025 05:27
@melissawm
Copy link
Member

I'm sorry I was too slow to review 😅 - I am undoing some of this PR in #811 since (I think) we don't want the announcement banner. We can also think about ways to document these decisions in the docs working group if it helps. Thanks!

willingc pushed a commit that referenced this pull request Aug 2, 2025
# References and relevant issues
Related to #807 and #801

# Description

Deactivates the announcement banner and moves the template back to
_static.

The reason the templates needs to live in _static is that we want to be
able to do updates to the banner without rebuilding the full docs site
(see
https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/announcements.html#update-or-remove-announcement-banner)

Also remove redundant logic for the version switcher.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When switched to old docs, there is no banner to suggest stable

3 participants