summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-04-12 22:27:30 +0200
committerLudovic Courtès <ludo@gnu.org>2021-04-12 22:27:30 +0200
commit187d98ecc5bd6b35f0421aa5eac905f47c656c6b (patch)
treea2b6c820302e14216c17e6ebe9764843c48b8ac0
parentwebsite: kickoff: Quote Andy's 2011 message. (diff)
website: Summarize blog posts on the overview page.
* website/haunt.scm (summarize-post): New procedure. (post->sxml): Use it. * website/posts/kickoff.md: Move "DRAFT" below.
-rw-r--r--haunt.scm16
-rw-r--r--posts/kickoff.md4
2 files changed, 13 insertions, 7 deletions
diff --git a/haunt.scm b/haunt.scm
index c86ed04..a230226 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -179,14 +179,20 @@ representation."
179 ;; There's an implicit "/index.html" here. 179 ;; There's an implicit "/index.html" here.
180 "/" (site-post-slug site post)))) 180 "/" (site-post-slug site post))))
181 181
182(define (summarize-post post uri)
183 (match (post-sxml post)
184 ((('p paragraph ...) _ ...)
185 `((p ,@paragraph)
186 (p (a (@ (href ,uri)) "Continue reading…"))))
187 (body
188 body)))
189
182(define* (post->sxml post #:key post-uri summarize?) 190(define* (post->sxml post #:key post-uri summarize?)
183 "Return the SXML for POST." 191 "Return the SXML for POST."
184 (define post-body* 192 (define post-body*
185 ;; (if summarize? 193 (if summarize?
186 ;; (cut summarize-post <> post-uri) 194 (cut summarize-post <> post-uri)
187 ;; post-sxml*) 195 post-sxml))
188 post-sxml
189 )
190 196
191 `(div (@ (class "post")) 197 `(div (@ (class "post"))
192 (h1 (@ (class "title")) 198 (h1 (@ (class "title"))
diff --git a/posts/kickoff.md b/posts/kickoff.md
index 9af7c3e..78fa492 100644
--- a/posts/kickoff.md
+++ b/posts/kickoff.md
@@ -3,14 +3,14 @@ date: 2021-04-16 14:00:00
3author: The GNU Assembly 3author: The GNU Assembly
4--- 4---
5 5
6**DRAFT**
7
8Hi there! We’re excited to launch the GNU Assembly web site—“GNU” as in 6Hi there! We’re excited to launch the GNU Assembly web site—“GNU” as in
9“new”! This place intends to be a collaboration platform for the 7“new”! This place intends to be a collaboration platform for the
10developers of GNU packages who are all “hacking for user freedom” and 8developers of GNU packages who are all “hacking for user freedom” and
11who [share a vision](/en/documents/social-contract) for the umbrella 9who [share a vision](/en/documents/social-contract) for the umbrella
12project. 10project.
13 11
12**DRAFT**
13
14Truth be told, this is an old story finally becoming a reality. Almost 14Truth be told, this is an old story finally becoming a reality. Almost
15ten years ago, Andy Wingo (of GNU Guile) emailed GNU maintainers: 15ten years ago, Andy Wingo (of GNU Guile) emailed GNU maintainers:
16 16