X-Git-Url: https://git.shemshak.org/~bandali/bndl.org/blobdiff_plain/85314da0ba587c12c25c8d0fb9ca2708adb487ca..cd5ad35b4106a2106313bd1ac3cb399218a58423:/haunt.scm diff --git a/haunt.scm b/haunt.scm index be470cd..2bf1ce1 100644 --- a/haunt.scm +++ b/haunt.scm @@ -2,6 +2,7 @@ (haunt builder blog) (haunt builder atom) (haunt builder assets) + (haunt builder rss) (haunt html) (haunt page) (haunt post) @@ -32,7 +33,9 @@ (a (@ (href "license.html")) "license.html") " for license conditions. Please copy and share.")))))) -(define (bandali-post-template post) +(define my-date-format "~B ~d, ~Y") + +(define (my-post-template post) `((header (h1 ,(post-ref post 'title)) (address "By " @@ -40,10 +43,10 @@ ,(post-ref post 'author)) " <" ,(post-ref post 'email) ">") (p (@ (class "date")) - ,(date->string (post-date post) "~B ~d, ~Y"))) + ,(date->string (post-date post) my-date-format))) ,(post-sxml post))) -(define (bandali-collection-template site title posts prefix) +(define (my-collection-template site title posts prefix) (define (post-uri post) (string-append (or prefix "") "/" (site-post-slug site post) ".html")) @@ -54,7 +57,7 @@ `(li (a (@ (href ,(post-uri post))) ,(post-ref post 'title)) - " — " ,(date->string (post-date post) "~B ~d, ~Y"))) + " — " ,(date->string (post-date post) my-date-format))) posts)))) (define bandali-theme @@ -63,8 +66,14 @@ (lambda (site title body) (base-layout site body #:title title)) - #:post-template bandali-post-template - #:collection-template bandali-collection-template)) + #:post-template my-post-template + #:collection-template my-collection-template)) + +(define (static-page title file-name body) + (lambda (site posts) + (make-page file-name + (with-layout bandali-theme site title body) + sxml->html))) (define (index-material site posts) `(div @@ -106,19 +115,22 @@ ". I’m a " (a (@ (href "https://www.gnu.org/philosophy/free-sw.html")) "Free Software") - " activist and FSF " - (a (@ (href "https://www.fsf.org/associate/")) "supporter") - ", and a GNU " + " activist, a GNU " (a (@ (href "https://www.gnu.org/people/#bandali")) "maintainer") " and " (a (@ (href "https://www.gnu.org/people/webmeisters.html#bandali")) "webmaster") + ", and an " + (a (@ (href "https://www.fsf.org/associate/")) + "associate member") + " of the " (a (@ (href "https:///www.fsf.org") + (title "Free Software Foundation")) "FSF") ". I co-host the " (a (@ (href "https://emacsel.com")) "Emacs.el") " podcast with " - (a (@ (href "https://www.pygopar.com")) - "Daniel Gopar") ", and organize " + (a (@ (href "https://www.pygopar.com")) "Daniel Gopar") + ", and organize " (a (@ (href "https://emacsconf.org")) "EmacsConf") " with help" " from many wonderful people. I am also a member of the" " Systems Committee for the " @@ -197,17 +209,20 @@ (dd "Library and CLI for converting TeX and LaTeX to PNG " "images")) (h2 (@ (id "notes")) "Notes") - (ul + (table + (@ (class "post-list")) + (tbody ,@(map (lambda (post) (define (post-uri post) (string-append "/" (site-post-slug site post) ".html")) - `(li - (a (@ (href ,(post-uri post))) - ,(post-ref post 'title)) - " — " ,(date->string (post-date post) "~B ~d, ~Y"))) - (take-up-to 10 (posts/reverse-chronological posts)))))) + `(tr + (td (a (@ (href ,(post-uri post))) + ,(post-ref post 'title))) + (td (@ (style "font-size: 0.875em;")) + ,(date->string (post-date post) my-date-format)))) + (take-up-to 10 (posts/reverse-chronological posts))))))) (define (index-page site posts) (make-page @@ -215,6 +230,32 @@ (base-layout site (index-material site posts)) sxml->html)) +(define license-page + (static-page + "Licensing Information" + "license.html" + `((h1 "License information for bandali.eu.org") + (p "I strongly believe in " + (a (@ (href "https://questioncopyright.org/what_is_free_culture")) + "free culture") + " and that all creative works everywhere should be " + (a (@ (href "https://freedomdefined.org/Definition")) "free" + ".")) + (p "Unless otherwise noted material on this site is licensed " + "under the GNU General Public License as published by the " + "Free Software Foundation, either version 3 of the License, " + "or (at your option) any later version. A copy of the " + "license is included at " + (a (@ (href "gpl-3.0.html")) "gpl-3.0.html") ".") + (p "Some resources on free software and licenses:") + (ul + (li (a (@ (href "https://www.gnu.org/philosophy/free-sw.html")) + "What is free software?")) + (li (a (@ (href "https://www.gnu.org/licenses/license-list.html")) + "Various Licenses and Comments about Them")) + (li (a (@ (href "https://www.gnu.org/proprietary/proprietary.html")) + "Proprietary Software Is Often Malware")))))) + (define my-domain "bandali.eu.org") (site #:title "Amin Bandali" @@ -229,6 +270,11 @@ `(("Notes" "notes.html" ,posts/reverse-chronological))) index-page - (atom-feed) - (atom-feeds-by-tag) + (atom-feed + #:file-name "feed.atom") + (atom-feeds-by-tag + #:prefix "tags") + (rss-feed + #:file-name "feed.rss") + license-page (static-directory "static" "")))