From 804ef9b61eeccfcddba3be249392db0f152a7a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 12 Apr 2021 22:27:30 +0200 Subject: 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. --- website/haunt.scm | 16 +++++++++++----- website/posts/kickoff.md | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'website') diff --git a/website/haunt.scm b/website/haunt.scm index c86ed04..a230226 100644 --- a/website/haunt.scm +++ b/website/haunt.scm @@ -179,14 +179,20 @@ representation." ;; There's an implicit "/index.html" here. "/" (site-post-slug site post)))) +(define (summarize-post post uri) + (match (post-sxml post) + ((('p paragraph ...) _ ...) + `((p ,@paragraph) + (p (a (@ (href ,uri)) "Continue reading…")))) + (body + body))) + (define* (post->sxml post #:key post-uri summarize?) "Return the SXML for POST." (define post-body* - ;; (if summarize? - ;; (cut summarize-post <> post-uri) - ;; post-sxml*) - post-sxml - ) + (if summarize? + (cut summarize-post <> post-uri) + post-sxml)) `(div (@ (class "post")) (h1 (@ (class "title")) diff --git a/website/posts/kickoff.md b/website/posts/kickoff.md index 9af7c3e..78fa492 100644 --- a/website/posts/kickoff.md +++ b/website/posts/kickoff.md @@ -3,14 +3,14 @@ date: 2021-04-16 14:00:00 author: The GNU Assembly --- -**DRAFT** - Hi there! We’re excited to launch the GNU Assembly web site—“GNU” as in “new”! This place intends to be a collaboration platform for the developers of GNU packages who are all “hacking for user freedom” and who [share a vision](/en/documents/social-contract) for the umbrella project. +**DRAFT** + Truth be told, this is an old story finally becoming a reality. Almost ten years ago, Andy Wingo (of GNU Guile) emailed GNU maintainers: -- cgit v1.2.1