all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: davet@gnu.org
Cc: guix-devel@gnu.org
Subject: Re: Haunt patches
Date: Thu, 8 Feb 2018 18:12:44 +0100	[thread overview]
Message-ID: <20180208171243.dnligzfvwsxvc4l3@floriannotebook> (raw)
In-Reply-To: <20171223125116.33r6kjnu2zze7f2o@floriannotebook>

[-- Attachment #1: Type: text/plain, Size: 2233 bytes --]

Hello,

(Ccing guix-devel@gnu.org.)

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

https://pelzflorian.de/git/haunt/commit/?id=ac3e93fe35363fd0066cf93b969c95c0fde7a25a
https://pelzflorian.de/git/haunt/commit/?id=ca32925a58c8ec526653aff9825be2359bf358c3
https://pelzflorian.de/git/haunt/commit/?id=34f6b56bfe3a3059ced4be5e9b768a6a3a93c671

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.

https://lists.gnu.org/archive/html/guix-devel/2018-02/msg00118.html

While changing things I also added a #:subtitle key to
Atom-feeds-by-tag.

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

https://pelzflorian.de/git/pelzfloriande-website/commit/?id=02e80b47fe0a9929a25d4a5f7ce11a15e1042d6f

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
it.

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.

Regards,
Florian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

       reply	other threads:[~2018-02-08 17:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171223125116.33r6kjnu2zze7f2o@floriannotebook>
2018-02-08 17:12 ` pelzflorian (Florian Pelz) [this message]
2018-02-09 13:18   ` Haunt patches Ludovic Courtès
2018-02-09 13:39     ` pelzflorian (Florian Pelz)
2018-02-09 17:02       ` Web site i18n with Haunt Ludovic Courtès
2018-02-09 17:47         ` pelzflorian (Florian Pelz)
2018-02-09 23:14           ` Ricardo Wurmus
2018-02-11 13:52             ` pelzflorian (Florian Pelz)
2018-02-11 14:45               ` Ricardo Wurmus
2018-02-11 16:04                 ` pelzflorian (Florian Pelz)

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180208171243.dnligzfvwsxvc4l3@floriannotebook \
    --to=pelzflorian@pelzflorian.de \
    --cc=davet@gnu.org \
    --cc=guix-devel@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.