diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-10-26 22:51:05 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-10-27 00:03:58 +0200 |
commit | 864ff90859459615872d3d3b5e1574ac08c3839a (patch) | |
tree | a847a48233726be7f9c079340f7dfc669616fba3 /website/haunt.scm | |
parent | 55c4d5b809d90dfce49192700db37e6b25fb5266 (diff) | |
download | guix-artwork-864ff90859459615872d3d3b5e1574ac08c3839a.tar guix-artwork-864ff90859459615872d3d3b5e1574ac08c3839a.tar.gz |
website: main-page: Show posts provided by Haunt.
* website/www.scm (%atom-url, fetch-news, <news-entry>)
(news-items, news-entry->sxml): Remove.
(post->summary-sxml): New procedure.
(main-page): Add 'site' and 'posts' parameters. Use them to create the
"news-box".
* website/haunt.scm <site>: Add separate builder for guix.html.
Diffstat (limited to 'website/haunt.scm')
-rw-r--r-- | website/haunt.scm | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/website/haunt.scm b/website/haunt.scm index 7e694d2..761d488 100644 --- a/website/haunt.scm +++ b/website/haunt.scm @@ -28,6 +28,7 @@ (haunt builder blog) (haunt builder atom) (ice-9 match) + (srfi srfi-1) (www) (www utils) (www news)) @@ -71,12 +72,18 @@ (email . "guix-devel@gnu.org")) #:readers (list sxml-reader) #:builders - `(,@(map (match-lambda - ((file-name contents) - (lambda (site posts) - (with-url-parameters - (make-page file-name (contents) sxml->html))))) - %web-pages) + `(,(lambda (site posts) ;the main page + (with-url-parameters + (make-page "guix.html" (main-page site posts) + sxml->html))) + ,@(filter-map (match-lambda + (("guix.html" _) ;handled above + #f) + ((file-name contents) + (lambda (site posts) + (with-url-parameters + (make-page file-name (contents) sxml->html))))) + %web-pages) ,(blog #:theme (parameterized-theme %news-haunt-theme) #:prefix "news") ,(atom-feed #:file-name "news/feed.xml" |