[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: website: Enable directory choice in export procedure.
From: |
Mathieu Lirzin |
Subject: |
01/03: website: Enable directory choice in export procedure. |
Date: |
Mon, 11 May 2015 20:51:44 +0000 |
mthl pushed a commit to branch master
in repository guix-artwork.
commit 8920caf56cb389d4be848e20f699ceda644b2a10
Author: Mathieu Lirzin <address@hidden>
Date: Thu May 7 21:21:02 2015 +0200
website: Enable directory choice in export procedure.
* website/www.scm (export-web-site): Add 'directory' optional parameter.
---
website/www.scm | 10 ++++++----
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))