html.nix/examples/serve.nix
2022-07-30 12:42:09 +03:00

28 lines
388 B
Nix

{
tags,
pkgs,
}:
with pkgs.htmlNix; let
index = with tags;
html [
(body [
(p "Hello world!")
(mkLink "./ex.html" "say bye")
])
];
ex = with tags;
html [
(body [
(p "Bye world!")
(mkLink "./index.html" "go back")
])
];
site = {
"index.html" = index;
"ex.html" = ex;
};
in
mkServeFromSite site