[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Haunt patches

From: pelzflorian (Florian Pelz)
Subject: Re: Haunt patches
Date: Thu, 8 Feb 2018 18:12:44 +0100
User-agent: NeoMutt/20171208


(Ccing address@hidden)

I wrote patches that introduce page variants for translations.  I will
send them right after this mail.  If there are interested guix-devel
readers, they can find them at

A site can have a list of variants such as various languages,
e.g. '("de" "en").

Each page body can then optionally be a procedure that given a variant
returns a body.  If a page body is a procedure, the page is written
multiple times, once for each variant, unless the procedure returns #f
for the variant.

I previously wrote about variants in this discussion on the Guix
mailing list.

While changing things I also added a #:subtitle key to

I already restructured my website’s code to make use of the patches.

I would be grateful if you could comment further on style etc. so this
can eventually be merged, unless you think the approach is wrong.
Everything that can be done with variants is possible already by
adding one site builder for each language instead of just one site
builder, e.g. adding the same blog site builder once for each variant.
I think variants are the cleaner solution even though it means adding
many lambdas for each body.

If the approach is right, I should probably write documentation for

Alternatively backwards compatibility could be disregarded and
procedures returning bodies could take one more argument, the variant.
Another alternative would be doing nothing (except for adding
subtitles to atom-feeds-by-tag) since variants are just prettier but
not strictly needed.

One problem is that the page file name is not an argument to blog
layouts, so one cannot easily put links to the other variants of a
page on a page.  This does not yet address this issue.


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]