Closed thibaudcolas closed 1 year ago
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 (/latest-release
)
@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/"
@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 https://github.com/wagtail/wagtail/pull/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 https://github.com/wagtail/wagtail/issues/10105. Edit: done