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.
This commit is contained in:
Florian Pelz 2023-06-10 13:26:55 +02:00
parent 0250b260c8
commit bf07f52a57
No known key found for this signature in database
GPG Key ID: 300888CB39C63817
1 changed files with 5 additions and 1 deletions

View File

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