guix-commits
[Top][All Lists]
Advanced

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

01/02: website: Add tweaks for building guix.info site.


From: Ricardo Wurmus
Subject: 01/02: website: Add tweaks for building guix.info site.
Date: Sun, 23 Dec 2018 16:55:59 -0500 (EST)

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

commit 8d43edd1f6e22aee28df6d6394fd8101bb77c4f1
Author: Ricardo Wurmus <address@hidden>
Date:   Sat Dec 8 22:26:21 2018 +0100

    website: Add tweaks for building guix.info site.
---
 website/README                       |  3 +++
 website/apps/base/templates/help.scm | 10 +++++++---
 website/apps/base/utils.scm          |  9 +++++++--
 website/haunt.scm                    |  4 +++-
 4 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/website/README b/website/README
index d3a3a78..11f5058 100644
--- a/website/README
+++ b/website/README
@@ -32,6 +32,9 @@ Then, visit http://localhost:8080/guix.html in a web browser.
 
 You can stop the server pressing ~Ctrl + C~ twice.
 
+To build the website for guix.info set the environment variable
+=GUIX_WEB_SITE_INFO= first.
+
 * Deploying
 
 Like the pages of many GNU websites, this website is managed through
diff --git a/website/apps/base/templates/help.scm 
b/website/apps/base/templates/help.scm
index e570e06..8dc588e 100644
--- a/website/apps/base/templates/help.scm
+++ b/website/apps/base/templates/help.scm
@@ -65,10 +65,14 @@
        (p
         ,(link-more
           #:label "Read Guix manual"
-          #:url (guix-url "manual/"))
-         ,(link-more
+          #:url (if (getenv "GUIX_WEB_SITE_INFO")
+                 (guix-url "manual/en/")
+                 (guix-url "manual/")))
+     ,(link-more
           #:label "Get Guix reference card"
-          #:url (guix-url "guix-refcard.pdf"))))
+          #:url (if (getenv "GUIX_WEB_SITE_INFO")
+                 "https://www.gnu.org/software/guix/guix-refcard.pdf";
+                 (guix-url "guix-refcard.pdf")))))
 
 
        (div
diff --git a/website/apps/base/utils.scm b/website/apps/base/utils.scm
index cd4f2cf..1e46a5b 100644
--- a/website/apps/base/utils.scm
+++ b/website/apps/base/utils.scm
@@ -43,7 +43,9 @@
 ;;;
 
 (define guix-root-url-path
-  (make-parameter "/software/guix/")) ; Path to GNU Guix site in gnu.org
+  (if (getenv "GUIX_WEB_SITE_INFO")
+      (make-parameter "/")
+      (make-parameter "/software/guix/"))) ; Path to GNU Guix site in gnu.org
 
 (define latest-guix-version
   (make-parameter "0.16.0"))
@@ -106,7 +108,10 @@
    RETURN VALUE (string)
      A URL path. For example:
      /software/guix/manual/html_node/System-installation.html."
-  (string-append (guix-url "manual/html_node/") subpath))
+  (string-append
+   (guix-url (if (getenv "GUIX_WEB_SITE_INFO")
+                 "manual/en/"
+                 "manual/html_node/")) subpath))
 
 
 
diff --git a/website/haunt.scm b/website/haunt.scm
index 1ebdfae..2860da5 100644
--- a/website/haunt.scm
+++ b/website/haunt.scm
@@ -14,7 +14,9 @@
 
 
 (site #:title "GuixSD"
-      #:domain "https://gnu.org/software/guix";
+      #:domain (if (getenv "GUIX_WEB_SITE_INFO")
+                   "https://guix.info";
+                   "https://gnu.org/software/guix";)
       ;; BUG: Can't use . in directory names (e.g. /tmp/gnu.org).
       #:build-directory "/tmp/gnu/software/guix"
       #:readers (list sxml-reader html-reader commonmark-reader)



reply via email to

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