kaka.farm

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

commit 4369a89184920fa238845628a91dfe6578d2cae2
parent 544fc7938fcf3df2d5a707742ff1946158f84979
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Tue,  2 Jan 2024 20:33:29 +0200

Move index.html into an index.scm.

Diffstat:
Mhaunt.scm | 43+++++++++++++++++++++++++------------------
Ahaunt/kakafarm/index.scm | 98+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dkaka.farm/index.html | 82-------------------------------------------------------------------------------
3 files changed, 123 insertions(+), 100 deletions(-)

diff --git a/haunt.scm b/haunt.scm @@ -13,7 +13,10 @@ (haunt post) (haunt reader commonmark) (haunt reader) - (haunt site)) + (haunt site) + + (prefix (haunt kakafarm index) + haunt:kakafarm:index:)) (define (pp attribute record) (pretty-print (list attribute (attribute record)))) @@ -30,25 +33,28 @@ (define extension-regexp (make-regexp "(\\.\\w+)$")) -(define* (builder-experiment destination) +(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)))))))) + +(define* (page-builder destination make-sxml) (lambda (site posts) (serialized-artifact destination - `(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))))))) + (make-sxml #:posts posts) sxml->html))) (define (blog-theme-layout a-site a-page-title-string an-sxml-tree) @@ -71,7 +77,8 @@ sxml-reader) #:builders (list (blog #:prefix "/haunt/posts" #:theme blog-theme) - (builder-experiment "/haunt/index.html") + (page-builder "/haunt/index.html" make-haunt-blog-index-sxml) + (page-builder "/index.html" haunt:kakafarm:index:make-index-sxml) (atom-feed #:file-name "/haunt/feed.xml" #:blog-prefix "/haunt/posts") (atom-feeds-by-tag #:prefix "/haunt/feeds" diff --git a/haunt/kakafarm/index.scm b/haunt/kakafarm/index.scm @@ -0,0 +1,98 @@ +(define-library (haunt kakafarm index) + (import (guile)) + (export make-index-sxml) + + (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") + + (dd (pre "clipboard-speaker -p")) + + (dt "Guile>") + (dd (pre "clipboard-speaker --clipboard-type=p"))) + + "Or the contents of your clipboard:" + + (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")) + + (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 "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 "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") + ".")))))))) diff --git a/kaka.farm/index.html b/kaka.farm/index.html @@ -1,82 +0,0 @@ -<!DOCTYPE html> -<head> - <meta charset="UTF-8"> - <link rel="stylesheet" type="text/css" href="index.css"> - <title>💩 kaka farm 💩</title> -</head> - -<body> - <div id="topmostdiv"> - <h1>Various stuff:</h1> - - <h2>Clipboard Speaker</h2> - <p>An accessibility tool that reads either what you mark with your - mouse: - - <dl> - <dt>Python</dt> - <dd><pre>clipboard-speaker -p</pre></dd> - <dt>Guile</dt> - <dd><pre>clipboard-speaker --clipboard-type=p</pre></dd></dl> - - Or the contents of your clipboard: - - <dl> - <dt>Python<dt> <dd><pre>clipboard-speaker -b</pre></dd> - <dt>Guile<dt> <dd><pre>clipboard-speaker --clipboard-type=b</pre></dd></dl> - - <a href="https://sr.ht/~kakafarm/clipboard-speaker/">Clipboard - Speaker's Sourcehut repositories</a></p> - - <h3>Python Clipboard Speaker</h3> - <p>The original Python code: - <a href="https://git.sr.ht/~kakafarm/clipboard-speaker/">Python - Clipboard Speaker's Sourcehut repository</a></p> - - <h3>Guile Clipboard Speaker</h3> - <p>Also rewritten it in - Guile: <a href="https://git.sr.ht/~kakafarm/clipboard-speaker/">Guile - Clipboard Speaker's Sourcehut repository</a></p> - - <h2>Rusty Diceware</h2> - <p><a href="https://github.com/yuvallanger/rusty-diceware/">A - diceware tool in Rustlang.</a></p> - - <h2>"Blog"</h2> - <ul> - <li><a href="//kaka.farm/blog/">blog-ish</a></li> - <li><a href="//kaka.farm/haunt/">A Haunt blog!</a> Maybe I will - migrate everything into Haunt and SXML?</li> - </ul> - - <h2>Commonly Forgotten</h2> - <a href="//kaka.farm/~commonly-forgotten/">Commonly Forgotten</a> - has some terribly written notes. - - <h2>Git repository repositories</h2> - <p><ul> - <li>The static site - generator <a href="https://codemadness.org/stagit.html">Stagit</a> - (<a href="https://codemadness.org/git/stagit/file/README.html">README</a>) - was used to generate <a href="/stagit/">my copies of some of - my git repositories</a>.</li> - <li><a href="//sr.ht/~kakafarm/">Sourcehut</a></li> - <li><a href="//gitgud.io/yuvallanger/">GitGud profile</a></li> - <li><a href="//gitlab.com/yuvallanger/">GitLab profile</a></li> - <li><a href="//github.com/yuvallanger/">GitHub - profile</a></li></ul></p> - - <h2>org-roam notes</h2> - <p>Splitting your org-roam notes - into <a href="/private-org-roam-notes/">private</a> - and <a href="/org-roam-notes/">public</a> notes is a pain in the - arse. Luckily for me I - love <a href="//en.wikipedia.org/wiki/Pita"></a>.</p> - - <h2>Contact(?)</h2> - <ul> - <li><a href="">@kakafarm@emacs.ch</a>.</li> - </ul> - </div> -</body> -</html>