[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Static site generator
From: |
Sascha Ziemann |
Subject: |
Re: Static site generator |
Date: |
Sat, 14 Jan 2023 00:00:21 +0100 |
Am Fr., 13. Jan. 2023 um 18:33 Uhr schrieb James Crake-Merani
<james@jamescm.co.uk>:
>
> I was wondering if you guys are aware of any static site generators
> written in Guile. I'm looking for something that can be extended in
> Guile so I can write my own code for it in Scheme.
>
All you need is quasiquote, unquote and a function which formats SXML as XML.
(html
`("<!DOCTYPE html>"
,(let ((title "ceving"))
`(html (@ (lang "de"))
(head
(meta (@ (charset "utf-8")))
(title ,title))
(body
(h1 ,title)
(ul (li (a (@ (href "1")) "Hello"))))))))
The example is for Chez, but does not use any fancy:
https://gist.github.com/ceving/c8aefd0fc6ea4fbf89571599e1d61046