guix-commits
[Top][All Lists]
Advanced

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

07/09: website: Handle GUIX_WEB_SITE_ROOT_PATH not ending in a slash.


From: Florian Pelz
Subject: 07/09: website: Handle GUIX_WEB_SITE_ROOT_PATH not ending in a slash.
Date: Sun, 1 Dec 2019 11:32:13 -0500 (EST)

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

commit 03d424b6ae94d46a2d76326de95d6af982d33b70
Author: Florian Pelz <address@hidden>
Date:   Wed Oct 30 19:43:16 2019 +0000

    website: Handle GUIX_WEB_SITE_ROOT_PATH not ending in a slash.
    
    * website/apps/base/utils.scm (guix-root-url-path): Add check in setter.
---
 website/apps/base/utils.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/website/apps/base/utils.scm b/website/apps/base/utils.scm
index 508abcd..ebb4000 100644
--- a/website/apps/base/utils.scm
+++ b/website/apps/base/utils.scm
@@ -51,7 +51,11 @@
 
 (define guix-root-url-path
   ;; Path to GNU Guix site at guix.gnu.org.
-  (make-parameter (or (getenv "GUIX_WEB_SITE_ROOT_PATH") "/")))
+  (make-parameter (or (getenv "GUIX_WEB_SITE_ROOT_PATH") "/")
+                  (lambda (path)
+                    (if (string-suffix? "/" path)
+                        path
+                        (string-append path "/")))))
 
 (define latest-guix-version
   (make-parameter "1.0.1"))



reply via email to

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