diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-04-12 22:27:30 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-04-12 22:27:30 +0200 |
commit | 187d98ecc5bd6b35f0421aa5eac905f47c656c6b (patch) | |
tree | a2b6c820302e14216c17e6ebe9764843c48b8ac0 | |
parent | website: 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.
Diffstat (limited to '')
-rw-r--r-- | haunt.scm | 16 | ||||
-rw-r--r-- | posts/kickoff.md | 4 |
2 files changed, 13 insertions, 7 deletions
@@ -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 | |||
3 | author: The GNU Assembly | 3 | author: The GNU Assembly |
4 | --- | 4 | --- |
5 | 5 | ||
6 | **DRAFT** | ||
7 | |||
8 | Hi there! We’re excited to launch the GNU Assembly web site—“GNU” as in | 6 | Hi 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 |
10 | developers of GNU packages who are all “hacking for user freedom” and | 8 | developers of GNU packages who are all “hacking for user freedom” and |
11 | who [share a vision](/en/documents/social-contract) for the umbrella | 9 | who [share a vision](/en/documents/social-contract) for the umbrella |
12 | project. | 10 | project. |
13 | 11 | ||
12 | **DRAFT** | ||
13 | |||
14 | Truth be told, this is an old story finally becoming a reality. Almost | 14 | Truth be told, this is an old story finally becoming a reality. Almost |
15 | ten years ago, Andy Wingo (of GNU Guile) emailed GNU maintainers: | 15 | ten years ago, Andy Wingo (of GNU Guile) emailed GNU maintainers: |
16 | 16 | ||