Broken link (404) in blog post breadcrumbs

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxime Devos
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 9 Jun 2023 16:52
(name . bug-guix)(address . bug-guix@gnu.org)
24e4b24c-fef0-083c-3057-849ac2e9bfc6@telenet.be
Go to:
then click on the link ‘Parameterized Packages for GNU Guix’ in the
breadcrumbs ‘Home -> Blog -> Parameterized Packages for GNU Guix’.
This goes to
which is a 404 Not Found.
The same issue holds for non-English translations as well.
Other blog posts are affected as well.
Best regards
Maxime Devos
Attachment: OpenPGP_signature
P
P
pelzflorian (Florian Pelz) wrote on 10 Jun 2023 13:43
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 63975@debbugs.gnu.org)
87edmjtueq.fsf@pelzflorian.de
Maxime Devos <maximedevos@telenet.be> writes:
Toggle quote (9 lines)
> then click on the link ‘Parameterized Packages for GNU Guix’ in the
> breadcrumbs ‘Home -> Blog -> Parameterized Packages for GNU Guix’.
>
> This goes to
>
> https://guix.gnu.org/blog/2023/parameterized-packages-for-gnu-guix
>
> which is a 404 Not Found.

Thank you Maxime for spotting it!

The attached patch should fix it; I still need to test if it works
before pushing.

(Old blog posts still have a redirect from
but we do not want to add a redirect for each new blog post.)

Regards,
Florian
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Sat, 10 Jun 2023 13:26:55 +0200
Subject: [PATCH] website: blog: Refer to the localized URL in breadcrumbs.

Reported by Maxime Devos <maximedevos@telenet.be>

* website/apps/blog/templates/post.scm (post-t)[#:crumbs]: Append a
slash to the URL, so the guix-url procedure will treat it as a web
page and localize it.
---
website/apps/blog/templates/post.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/website/apps/blog/templates/post.scm b/website/apps/blog/templates/post.scm
index 0d6b08e..aba6fb9 100644
--- a/website/apps/blog/templates/post.scm
+++ b/website/apps/blog/templates/post.scm
@@ -1,4 +1,5 @@
;;; GNU Guix web site
+;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Initially written by sirgazil who waives all
;;; copyright interest on this file.
@@ -34,7 +35,8 @@
#:crumbs
(list (crumb (C_ "website menu" "Blog") (guix-url "blog/"))
(crumb (post-ref post 'title)
- (guix-url (post-url-path post))))
+ (guix-url (string-append (post-url-path post)
+ "/"))))
#:content
`(main
(article

base-commit: 0250b260c880aa43fcd0bd2655d924d4719082c4
--
2.40.1
P
P
pelzflorian (Florian Pelz) wrote on 10 Jun 2023 20:34
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 63975-done@debbugs.gnu.org)
87ttvf88ud.fsf@pelzflorian.de
Pushed as bf07f52a57505c4b12fa6b384b79751e387ae624 with some changes;
the change is effected in the post-url-path procedure now.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 63975@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 63975
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch