From: Sascha Ziemann <ceving@gmail.com>
To: guile-user@gnu.org
Subject: Re: Static site generator
Date: Sat, 14 Jan 2023 00:00:21 +0100 [thread overview]
Message-ID: <CAGUt3y6ZN_udq38OvtxwM=JUUtwfUcVA2B_dO6Zqk7PwHe32Xg@mail.gmail.com> (raw)
In-Reply-To: <fba8ab73-2b6e-d2ef-5293-d66178a69cf5@jamescm.co.uk>
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
next prev parent reply other threads:[~2023-01-13 23:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 17:03 Static site generator James Crake-Merani
2023-01-13 17:49 ` Olivier Dion via General Guile related discussions
2023-01-13 17:53 ` Jack Hill
2023-01-13 18:40 ` James Crake-Merani
2023-01-13 18:52 ` Massimiliano Gubinelli
2023-01-13 19:36 ` david larsson
2023-01-13 23:00 ` Sascha Ziemann [this message]
2023-01-13 23:54 ` Dr. Arne Babenhauserheide
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGUt3y6ZN_udq38OvtxwM=JUUtwfUcVA2B_dO6Zqk7PwHe32Xg@mail.gmail.com' \
--to=ceving@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).