kaka.farm

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit ad4fbb89b15281a806057836dc0d83491a78af16
parent 0b07a0da24893de274c0f06e9856ca1bdd12c8cc
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Wed,  3 Jan 2024 00:06:23 +0200

Add a doctype to the SXML trees.

Diffstat:
Mhaunt.scm | 53+++++++++++++++++++++++++++++------------------------
Mkakafarm/index.scm | 163++++++++++++++++++++++++++++++++++++++++---------------------------------------
2 files changed, 111 insertions(+), 105 deletions(-)

diff --git a/haunt.scm b/haunt.scm @@ -5,6 +5,7 @@ (sxml simple) + (haunt asset) (haunt artifact) (haunt builder assets) (haunt builder atom) @@ -21,6 +22,9 @@ (define (pp attribute record) (pretty-print (list attribute (attribute record)))) +(define (make-favicon-asset) + (make-asset "assets/logo.png" "/favicon.ico")) + (define (post->sxml-link post) `(li (a (@ (href ,(regexp-substitute #f @@ -34,21 +38,22 @@ (define extension-regexp (make-regexp "(\\.\\w+)$")) (define* (make-haunt-blog-index-sxml #:key posts) - `(html (head (meta (@ (charset "UTF-8"))) - (link (@ (rel "stylesheet") - (type "text/css") - (href "/index.css"))) - (title "Kaka Farm's Haunt site! D:<")) - (body (h1 "Kakafarm's Haunt") - (p (a (@ (href "/haunt/posts/")) - "posts")) - (p (a (@ (href "/haunt/feed.xml")) - "atom feed")) - (h2 "Latest posts:") - (div (@ (class "latest-posts")) - (ul ,(map post->sxml-link (take posts - (min (length posts) - 5)))))))) + `((doctype "html") + (html (head (meta (@ (charset "UTF-8"))) + (link (@ (rel "stylesheet") + (type "text/css") + (href "/assets/index.css"))) + (title "Kaka Farm's Haunt site! D:<")) + (body (h1 "Kakafarm's Haunt") + (p (a (@ (href "/haunt/posts/")) + "posts")) + (p (a (@ (href "/haunt/feed.xml")) + "atom feed")) + (h2 "Latest posts:") + (div (@ (class "latest-posts")) + (ul ,(map post->sxml-link (take posts + (min (length posts) + 5))))))))) (define* (page-builder destination make-sxml) (lambda (site posts) @@ -58,12 +63,13 @@ sxml->html))) (define (blog-theme-layout a-site a-page-title-string an-sxml-tree) - `(html (head (meta (@ (charset "UTF-8"))) - (link (@ (rel "stylesheet") - (type "text/css") - (href "/index.css"))) - (title "Kaka Farm's Haunt site! D:<")) - (body ,an-sxml-tree))) + `((doctype "html") + (html (head (meta (@ (charset "UTF-8"))) + (link (@ (rel "stylesheet") + (type "text/css") + (href "/assets/index.css"))) + (title "Kaka Farm's Haunt site! D:<")) + (body ,an-sxml-tree)))) (define blog-theme (theme #:name "blog-theme" @@ -83,6 +89,5 @@ #:blog-prefix "/haunt/posts") (atom-feeds-by-tag #:prefix "/haunt/feeds" #:blog-prefix "/haunt/feeds/") - (static-directory "kaka.farm" "/") - (static-directory "assets" "haunt/assets") - (static-directory "images" "haunt/images"))) + (static-directory "assets" "assets") + (static-directory "images" "images"))) diff --git a/kakafarm/index.scm b/kakafarm/index.scm @@ -4,95 +4,96 @@ (begin (define* (make-index-sxml #:key posts) - `(html - (head - (meta (@ (charset "UTF-8"))) - (link (@ (rel "stylesheet") - (type "text/css") - (href "index.css"))) - (title "💩 kaka farm 💩")) - (body - (div (@ (id "topmostdiv")) - (h1 "Various stuff:") - (h2 "Clipboard Speaker") - (p "An accessibility tool that reads either what you mark with your mouse:" - (dl - (dt "Python") + `((doctype "html") + (html + (head + (meta (@ (charset "UTF-8"))) + (link (@ (rel "stylesheet") + (type "text/css") + (href "/assets/index.css"))) + (title "💩 kaka farm 💩")) + (body + (div (@ (id "topmostdiv")) + (h1 "Various stuff:") + (h2 "Clipboard Speaker") + (p "An accessibility tool that reads either what you mark with your mouse:" + (dl + (dt "Python") - (dd (pre "clipboard-speaker -p")) + (dd (pre "clipboard-speaker -p")) - (dt "Guile>") - (dd (pre "clipboard-speaker --clipboard-type=p"))) + (dt "Guile>") + (dd (pre "clipboard-speaker --clipboard-type=p"))) - "Or the contents of your clipboard:" + "Or the contents of your clipboard:" - (dl - (dt "Python") - (dd (pre "clipboard-speaker -b")) - (dt "Guile") - (dd (pre "clipboard-speaker --clipboard-type=b"))) + (dl + (dt "Python") + (dd (pre "clipboard-speaker -b")) + (dt "Guile") + (dd (pre "clipboard-speaker --clipboard-type=b"))) - (a (@ (href "https://sr.ht/~kakafarm/clipboard-speaker/")) - "Clipboard Speaker's Sourcehut repositories")) - (h3 "Python Clipboard Speaker") - (p "The original Python code:" - (a (@ (href "https://git.sr.ht/~kakafarm/clipboard-speaker/")) - "Python Clipboard Speaker's Sourcehut repository")) - (h3 "Guile Clipboard Speaker") - (p "Also rewritten it in Guile:" - (a (@ (href "https://git.sr.ht/~kakafarm/clipboard-speaker/")) - "Guile Clipboard Speaker's Sourcehut repository")) + (a (@ (href "https://sr.ht/~kakafarm/clipboard-speaker/")) + "Clipboard Speaker's Sourcehut repositories")) + (h3 "Python Clipboard Speaker") + (p "The original Python code:" + (a (@ (href "https://git.sr.ht/~kakafarm/clipboard-speaker/")) + "Python Clipboard Speaker's Sourcehut repository")) + (h3 "Guile Clipboard Speaker") + (p "Also rewritten it in Guile:" + (a (@ (href "https://git.sr.ht/~kakafarm/clipboard-speaker/")) + "Guile Clipboard Speaker's Sourcehut repository")) - (h2 "Rusty Diceware") - (p - (a (@ (href "https://github.com/yuvallanger/rusty-diceware/")) - "A diceware tool in Rustlang.")) + (h2 "Rusty Diceware") + (p + (a (@ (href "https://github.com/yuvallanger/rusty-diceware/")) + "A diceware tool in Rustlang.")) - (h2 "Blog") - (ul - (li (a (@ (href "//kaka.farm/blog/")) - "blog-ish")) - (li (a (@ (href "//kaka.farm/haunt/")) - "A Haunt blog! Maybe I will migrate everything into Haunt and SXML?"))) + (h2 "Blog") + (ul + (li (a (@ (href "//kaka.farm/blog/")) + "blog-ish")) + (li (a (@ (href "//kaka.farm/haunt/")) + "A Haunt blog! Maybe I will migrate everything into Haunt and SXML?"))) - (h2 "Commonly Forgotten") - (a (@ (href "//kaka.farm/~commonly-forgotten/")) "Commonly Forgotten") - " " - "has some terribly written notes (which I should consolidate into Haunt)." + (h2 "Commonly Forgotten") + (a (@ (href "//kaka.farm/~commonly-forgotten/")) "Commonly Forgotten") + " " + "has some terribly written notes (which I should consolidate into Haunt)." - (h2 "Git repository repositories") - (p (ul (li "The static site generator" - (a (@ (href "https://codemadness.org/stagit.html")) - "Stagit") - "(" - (a (@ (href "https://codemadness.org/git/stagit/file/README.html")) - "README") - ") was used to generate" - (a (@ (href "/stagit/")) - "my copies of some of my git repositories") - ".") - (li (a (@ (href "//sr.ht/~kakafarm/")) "Sourcehut")) - (li (a (@ (href "//gitgud.io/yuvallanger/")) "GitGud profile")) - (li (a (@ (href "//gitlab.com/yuvallanger/")) "GitLab profile")) - (li (a (@ (href "//github.com/yuvallanger/")) "GitHub profile")))) + (h2 "Git repository repositories") + (p (ul (li "The static site generator" + (a (@ (href "https://codemadness.org/stagit.html")) + "Stagit") + "(" + (a (@ (href "https://codemadness.org/git/stagit/file/README.html")) + "README") + ") was used to generate" + (a (@ (href "/stagit/")) + "my copies of some of my git repositories") + ".") + (li (a (@ (href "//sr.ht/~kakafarm/")) "Sourcehut")) + (li (a (@ (href "//gitgud.io/yuvallanger/")) "GitGud profile")) + (li (a (@ (href "//gitlab.com/yuvallanger/")) "GitLab profile")) + (li (a (@ (href "//github.com/yuvallanger/")) "GitHub profile")))) - (h2 "org-roam notes") - (p - "Splitting your org-roam notes into" - (a (@ (href "/private-org-roam-notes/")) "private") - " " - "and" - " " - (a (@ (href "/org-roam-notes/")) - "public") - " " - "notes is a pain in the arse. Luckily for me I love" - " " - (a (@ (href "//en.wikipedia.org/wiki/Pita")) - ".")) + (h2 "org-roam notes") + (p + "Splitting your org-roam notes into" + (a (@ (href "/private-org-roam-notes/")) "private") + " " + "and" + " " + (a (@ (href "/org-roam-notes/")) + "public") + " " + "notes is a pain in the arse. Luckily for me I love" + " " + (a (@ (href "//en.wikipedia.org/wiki/Pita")) + ".")) - (h2 "Contact(?)") - (ul - (li (a (@ (href "https://emacs.ch/@kakafarm")) - "@kakafarm@emacs.ch") - ".")))))))) + (h2 "Contact(?)") + (ul + (li (a (@ (href "https://emacs.ch/@kakafarm")) + "@kakafarm@emacs.ch") + ".")))))))))