guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: website: blog: Refer to the localized URL in breadcrumbs.


From: Florian Pelz
Subject: 01/02: website: blog: Refer to the localized URL in breadcrumbs.
Date: Sat, 10 Jun 2023 14:32:41 -0400 (EDT)

pelzflorian pushed a commit to branch master
in repository guix-artwork.

commit bf07f52a57505c4b12fa6b384b79751e387ae624
Author: Florian Pelz <pelzflorian@pelzflorian.de>
AuthorDate: Sat Jun 10 13:26:55 2023 +0200

    website: blog: Refer to the localized URL in breadcrumbs.
    
    Fixes <https://issues.guix.gnu.org/63975>.
    Reported by Maxime Devos <maximedevos@telenet.be>.
    
    * website/apps/blog/utils.scm (post-url-path): Append a slash to
    the URL, so the guix-url procedure will treat it as a web page
    and localize it.
---
 website/apps/blog/utils.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/website/apps/blog/utils.scm b/website/apps/blog/utils.scm
index 96a8f0e..a6e738c 100644
--- a/website/apps/blog/utils.scm
+++ b/website/apps/blog/utils.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix web site
 ;;; Copyright © 2016, 2017, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;;
 ;;; This file is part of the GNU Guix web site.
 ;;;
@@ -54,9 +55,12 @@
 
    POST (<post>)
      A post object as defined in (haunt post) module."
+  ;; Note: End the path with a slash so 'localized-root-path' down the road
+  ;; prepends the language tag.
   (url-path-join "blog"
                 (date->string (post-date post) "~Y")
-                (post-slug post)))
+                 (post-slug post)
+                 ""))
 
 
 (define (posts/latest posts n)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]