3bd43e39dd
Currently nix/html requires that the content of an element is either an HTML string (which may or may not be generated by the library) or a flat list of HTML strings (which may or may not be generated by the library). I've found that this requirement makes authoring more complex pages that have programmatically generated parts cumbersome since one needs to take care that returned lists are appended, not included as an element. This leads to confusing code and annoying errors. We don't really care about the nesting of a content list as long as the order is clear, so we can just flatten the list making life a little easier: (<main> { } [ (<section> { } (<h2> { } "static section")) listOfGeneratedSections (<section> { } (<h2> { } "another section")) ]) Change-Id: I06016a8eff01d34d7eaea7798a00ed191115f9c8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12908 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> |
||
---|---|---|
.. | ||
clhs-lookup | ||
dot-time-man-pages | ||
emacs | ||
exercises/aoc | ||
external | ||
git-only-push | ||
htmlman | ||
machines | ||
mblog | ||
modules | ||
nix | ||
nixpkgs-crate-holes | ||
secrets | ||
keys.nix | ||
OWNERS |