Maxime Devos <[email protected]> writes:
> 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
https://guix.gnu.org/blog/2019/post-url-path to
https://guix.gnu.org/en/blog/2019/post-url-path in maintenance.git,
but we do not want to add a redirect for each new blog post.)

Regards,
Florian

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

Fixes <https://issues.guix.gnu.org/63975>.
Reported by Maxime Devos <[email protected]>

* 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(-)

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 <[email protected]>
 ;;; 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

Reply via email to