summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@openmailbox.org>2015-05-07 21:21:02 +0200
committerMathieu Lirzin <mthl@openmailbox.org>2015-05-11 22:45:55 +0200
commit8920caf56cb389d4be848e20f699ceda644b2a10 (patch)
treeaa685f4b977ff1c7b7761c673c89d77d6f99c2b9
parentac542b079a1aeae51c19b847ec5af6a1fcc9e388 (diff)
downloadguix-artwork-8920caf56cb389d4be848e20f699ceda644b2a10.tar
guix-artwork-8920caf56cb389d4be848e20f699ceda644b2a10.tar.gz
website: Enable directory choice in export procedure.
* website/www.scm (export-web-site): Add 'directory' optional parameter.
-rw-r--r--website/www.scm10
1 files changed, 6 insertions, 4 deletions
diff --git a/website/www.scm b/website/www.scm
index 38a0d0d..2949102 100644
--- a/website/www.scm
+++ b/website/www.scm
@@ -321,9 +321,11 @@ lists")))))
(lambda (port)
(sxml->xml page port))))
-(define (export-web-site)
- "Export the whole web site as HTML files created in the current directory."
+(define* (export-web-site #:optional (directory "."))
+ "Export the whole web site as HTML files created in DIRECTORY."
(for-each (match-lambda
- ((file page)
- (export-web-page page file)))
+ ((filename page)
+ (export-web-page page (string-append directory
+ file-name-separator-string
+ filename))))
%web-pages))