[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: website: Turn pages into thunks.
From: |
Ludovic Courtès |
Subject: |
03/03: website: Turn pages into thunks. |
Date: |
Tue, 12 May 2015 19:46:18 +0000 |
civodul pushed a commit to branch master
in repository guix-artwork.
commit c99035a82698885e0a50ba7853d2a56752af3c99
Author: Ludovic Courtès <address@hidden>
Date: Tue May 12 21:45:54 2015 +0200
website: Turn pages into thunks.
This allows 'current-url-root' to be used to parametrize the output.
* website/www.scm (main-page): Turn into a thunk.
(export-web-site): Invoke PAGE.
* website/www/about.scm (about-page): Turn into a thunk.
* website/www/contribute.scm (contribute-page): Likewise.
* website/www/donate.scm (donate-page): Likewise.
* website/www/download.scm (download-page): Likewise.
* website/www/help.scm (help-page): Likewise.
* website/www/packages.scm (packages-page): Likewise.
---
website/www.scm | 9 +++++----
website/www/about.scm | 2 +-
website/www/contribute.scm | 2 +-
website/www/donate.scm | 2 +-
website/www/download.scm | 2 +-
website/www/help.scm | 2 +-
website/www/packages.scm | 2 +-
7 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/website/www.scm b/website/www.scm
index c045246..e7b8dad 100644
--- a/website/www.scm
+++ b/website/www.scm
@@ -15,7 +15,7 @@
export-web-page
export-web-site))
-(define main-page
+(define (main-page)
`(html (@ (lang "en"))
,(html-page-header "Home" #:css "index.css")
(body
@@ -262,7 +262,8 @@ the broader GNU system.")
"Export the whole web site as HTML files created in DIRECTORY."
(for-each (match-lambda
((filename page)
- (export-web-page page (string-append directory
- file-name-separator-string
- filename))))
+ (export-web-page (page)
+ (string-append directory
+ file-name-separator-string
+ filename))))
%web-pages))
diff --git a/website/www/about.scm b/website/www/about.scm
index ce48638..f6b7cc7 100644
--- a/website/www/about.scm
+++ b/website/www/about.scm
@@ -3,7 +3,7 @@
#:use-module (www shared)
#:export (about-page))
-(define about-page
+(define (about-page)
`(html (@ (lang "en"))
,(html-page-header "About")
(body
diff --git a/website/www/contribute.scm b/website/www/contribute.scm
index b1e4b93..970e74a 100644
--- a/website/www/contribute.scm
+++ b/website/www/contribute.scm
@@ -3,7 +3,7 @@
#:use-module (www shared)
#:export (contribute-page))
-(define contribute-page
+(define (contribute-page)
`(html (@ (lang "en"))
,(html-page-header "Contribute")
(body
diff --git a/website/www/donate.scm b/website/www/donate.scm
index e238444..811dd29 100644
--- a/website/www/donate.scm
+++ b/website/www/donate.scm
@@ -3,7 +3,7 @@
#:use-module (www shared)
#:export (donate-page))
-(define donate-page
+(define (donate-page)
`(html (@ (lang "en"))
,(html-page-header "Home")
(body
diff --git a/website/www/download.scm b/website/www/download.scm
index e2e83fa..d7661a1 100644
--- a/website/www/download.scm
+++ b/website/www/download.scm
@@ -3,7 +3,7 @@
#:use-module (www shared)
#:export (download-page))
-(define download-page
+(define (download-page)
`(html (@ (lang "en"))
,(html-page-header "Download" #:css "download.css")
(body
diff --git a/website/www/help.scm b/website/www/help.scm
index c88f726..dc83849 100644
--- a/website/www/help.scm
+++ b/website/www/help.scm
@@ -3,7 +3,7 @@
#:use-module (www shared)
#:export (help-page))
-(define help-page
+(define (help-page)
`(html (@ (lang "en"))
,(html-page-header "Help" #:css "help.css")
(body
diff --git a/website/www/packages.scm b/website/www/packages.scm
index bb9c75f..549a27e 100644
--- a/website/www/packages.scm
+++ b/website/www/packages.scm
@@ -2,7 +2,7 @@
#:use-module (www shared)
#:export (packages-page))
-(define packages-page
+(define (packages-page)
`(html (@ (lang "en"))
,(html-page-header "Packages")
(body