-
Notifications
You must be signed in to change notification settings - Fork 26
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
Create a redirect view for future releases not set up on the site yet #306
Comments
The existence of this issue makes sense of what I just noticed, which is that the "latest" redirect is still going to "what's new in Wagtail 4.2", while the link text in the CMS now reads "what's new in Wagtail 5.0" now that I've updated my project :) |
Thanks for reporting @sheepman4267! I thought I had updated the redirects but I had missed this one. All the more reason to automate this even if this is simple to do manually. |
(Possibly to consider in the future always-on redirect view that takes people to the latest release’s release notes ( Release notes link@register.simple_tag
def wagtail_feature_release_whats_new_link():
major, minor, patch, release, num = VERSION
if release == "final":
return f"https://guide.wagtail.org/en-{major}.{minor}.x/releases/new-in-wagtail-{major}-{minor}/"
return "magic view that always links to the latest release or existing Wagtail redirect https://guide.wagtail.org/en-latest/releases/latest/" Homepage link@register.simple_tag
def wagtail_feature_release_editor_guide_link():
major, minor, patch, release, num = VERSION
if release == "final":
return f"https://guide.wagtail.org/en-{major}.{minor}.x/"
return "https://guide.wagtail.org/" |
Fixed in #375. See also wagtail/wagtail#11182. |
There are two links from the CMS to this website that it would be nice to future-proof with a view / middleware that automates redirects, or a custom 404 page set up accordingly.
Release notes links
For links to "New in Wagtail x.y" - https://guide.wagtail.org/en-4.2.x/releases/new-in-wagtail-4-2/. Currently the CMS defaults to targeting a manually created redirect,
https://guide.wagtail.org/en-latest/releases/latest/
, which we then update in the guide.wagtail.org admin.Instead, we could set up links like for docs.wagtail.org:
and make sure any version of the guide that doesn’t yet exist is handled gracefully.
Guide homepage links
We currently link to
https://guide.wagtail.org/
which redirects tolatest
. It’d again be nicer if we linked straight to a specific version based on the version of the CMS, and gracefully handled versions that don’t exist yet.I expect as part of changing this we will also be able to fix wagtail/wagtail#10105. Edit: done
The text was updated successfully, but these errors were encountered: