website: Add tweaks for building guix.info site.

This commit is contained in:
Ricardo Wurmus 2018-12-08 22:26:21 +01:00
parent 6e2b5d01d2
commit 8d43edd1f6
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
4 changed files with 20 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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