diff options
author | sterni <sternenseemann@systemli.org> | 2021-08-25T00·45+0200 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2021-08-26T15·34+0000 |
commit | 9ed439bfbddee7915c4011f8a6ba7562b3375ac8 (patch) | |
tree | 6343c44bb40676d684aceec57bab7b26388f7914 /users/sterni/htmlman/defaultStyle.nix | |
parent | 17d78867bbef8a3df1271137a2db18b3584cdc39 (diff) |
feat(users/sterni/nix): cursed nix html DSL r/2784
Couldn't sleep, so I made a surprisingly neat way to render HTML documents in Nix using our favorite feature __findFile: let inherit (depot.users.sterni.nix.html) __findFile esc; in <html> {} [ (<head> {} [ (<meta> { charset = "utf-8"; } null) (<title> {} (esc "hello")) ]) (<body> {} [ (<h1> {} (esc "hello world")) ]) ] => "<html><head><meta charset=\"utf-8\"/><title>hello</title></head><body><h1>hello world</h1></body></html>" Change-Id: Id36808a56ae3da3b5263c06f29342fc22d105c21 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3410 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'users/sterni/htmlman/defaultStyle.nix')
0 files changed, 0 insertions, 0 deletions