Skip to content
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

Add interstitial redirects and old images. #600

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

freakboy3742
Copy link
Member

In the process of writing #599, I noticed that the image link on the top of the Briefcase release page on PyPI was broken.

This was caused by the recent website refactor, and was corrected in main as part of beeware/briefcase#2172, but I hadn't considered all the historical image links that would have been affected.

This PR restores the images for all "active" projects to their original locations, so that historical image links will continue to work. Unfortunately, it doesn't look like Lektor will let us to redirects for images.

However, it turns out the redirects for old URLs weren't working either - although the old Briefcase URL has a redirect defined, it's parent page doesn't have any content, and as a result, what should have been a redirect is currently returning a 404.

This PR adds content pages all the "interstitial" URLs in the project hierarchy - to specific new locations where possible; to /project where there isn't an obvious mapping.

This then allows the images to be served at their original locations, and the old project URLs to be redirects.

@freakboy3742 freakboy3742 requested a review from mhsmith February 28, 2025 05:22
@freakboy3742 freakboy3742 added the preview Approved for an automated preview label Feb 28, 2025
Copy link

Visit the preview URL for this PR (updated for commit 565c18c):

https://beeware-org--pr600-redirect-fix-fd2p944z.web.app

(expires Fri, 07 Mar 2025 14:03:46 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: b0da44bc067e7d9a4255c77cb2c5fce572218cec

@mhsmith
Copy link
Member

mhsmith commented Feb 28, 2025

This PR restores the images for all "active" projects to their original locations, so that historical image links will continue to work.

Doesn't this mean there are now two copies of each image? This will inevitably cause confusion when someone updates one and doesn't update the other. It would be better to either:

  • Update all the incoming links – unlike links to pages, we can reasonably assume that nothing outside of our control has ever linked directly to an image; or
  • Remove the new image URLs and make everything use the old ones.

@freakboy3742
Copy link
Member Author

This PR restores the images for all "active" projects to their original locations, so that historical image links will continue to work.

Doesn't this mean there are now two copies of each image?

Yes, it does.

This will inevitably cause confusion when someone updates one and doesn't update the other.

I agree it's a PITA that we need a copy and can't just use a symlink. If I had to retroactively explain it, I'd argue it's a way to capture what was the logo as of March 1 2025... that's not a great explanation, but it's an explanation.

It would be better to either:

  • Update all the incoming links – unlike links to pages, we can reasonably assume that nothing outside of our control has ever linked directly to an image; or
  • Remove the new image URLs and make everything use the old ones.

To the best of my knowledge, we have updated all the existing links - but there's still some we can't update.

  1. We can't update the README for a published PyPI entry, and those pages include a link the old location - e.g., https://pypi.org/project/briefcase/0.3.22/
  2. There are third-party links that we can't control. Cool URIs don't change, and yanking the old image is "uncool" 😎 .

Admittedly, I'm not overly concerned about (2). (1) isn't a huge issue either... but it's also a relatively trivial fix for the cost of a couple of copied files on disk. I'd argue it's worth the inconvenience, but I also won't push back too hard if you think we should drop them and just let the images go stale.

@mhsmith
Copy link
Member

mhsmith commented Mar 3, 2025

We can't update the README for a published PyPI entry, and those pages include a link the old location

OK, we'd better not break those. In that case, if the entire projects directory is now only for backward compatibility, can you add a README or something explaining what its purposes are, and why the images can't be a redirect?

@freakboy3742
Copy link
Member Author

@mhsmith I've added an explainer README.

@mhsmith mhsmith merged commit a43cff7 into beeware:lektor Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Approved for an automated preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants