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
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