diff options
Diffstat (limited to 'website/haunt.scm')
| -rw-r--r-- | website/haunt.scm | 16 |
1 files changed, 11 insertions, 5 deletions
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." | |||
| 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")) |