summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry J. Webster <hwebs@hwebs.info>2026-08-15 09:53:12 -0500
committerHenry J. Webster <hwebs@hwebs.info>2026-08-15 09:53:12 -0500
commit533fb6bd336ae32f109712e9e2d59f18159736e3 (patch)
treeee3e1b41d4466e5fa6dd1e5c9bb731a239071699
parent3eaf337ab93411785b94ad2a82ab88ae71d5f478 (diff)
Only blog posts are <article>
Attempting to be more semantic. - Blog posts are wrapped in <article> - Other pages are not
-rw-r--r--theme.scm16
1 files changed, 9 insertions, 7 deletions
diff --git a/theme.scm b/theme.scm
index 7e9ac41..7eb63a3 100644
--- a/theme.scm
+++ b/theme.scm
@@ -40,8 +40,7 @@
(li (a (@ (href "/now")) "Now"))
(li (a (@ (href "/blog")) "Blog")))))
(main
- (article (h1 ,title)
- ,body)))))))
+ ,body))))))
(define hwebs-theme-blog
@@ -51,11 +50,13 @@
(lambda (post)
;; TODO fill in datetime correctly
;; TODO add <author>? (as hidden?)
- `((time ,(date->string*(post-date post)))
- ,(post-sxml post)))
+ `((article (h1 ,(post-title post))
+ (time ,(date->string*(post-date post)))
+ ,(post-sxml post))))
#:collection-template
(lambda (site title posts prefix)
- `((p (a (@ (href "/blog/feed.xml")) "Atom feed."))
+ `((h1 ,title)
+ (p (a (@ (href "/blog/feed.xml")) "Atom feed."))
(ul
,@(map (lambda (post)
`(li (a (@ (href ,(post-uri post site prefix)))
@@ -65,7 +66,7 @@
posts))))))
(define (flat-page-template site metadata body)
- ((theme-layout hwebs-theme-blog) site (assq-ref metadata 'title) body))
+ ((theme-layout hwebs-theme-blog) site (assq-ref metadata 'title) `((h1 ,(assq-ref metadata 'title)) ,body)))
;;
;; NOW
@@ -88,7 +89,8 @@
#:collection-template
(lambda (site title posts prefix)
- `((p "My implementation of the "
+ `((h1 ,title)
+ (p "My implementation of the "
(a (@ (href "https://nownownow.com/about")) "\"now page\" concept by Derek Sivers")
".")
,@(map (lambda (post)