forked from Fediversity/fediversity.eu
fix semantics: wrap content body into section
This commit is contained in:
parent
15984affec
commit
c5fad394de
|
@ -36,6 +36,15 @@ rec {
|
|||
packages = with pkgs; [
|
||||
cmark
|
||||
npins
|
||||
watchexec
|
||||
];
|
||||
shellHook = ''
|
||||
cat << EOF
|
||||
For incremental rebuilds:
|
||||
|
||||
echo watchexec -e nix "nix-build -A build"
|
||||
firefox --new-tab file:///${toString ./.}/result/index.html
|
||||
EOF
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
2
lib.nix
2
lib.nix
|
@ -8,6 +8,8 @@ rec {
|
|||
result // {
|
||||
override = new:
|
||||
let
|
||||
# TODO: let overrides take the previous state as an argument
|
||||
# base' = lib.recursiveUpdate base (new base);
|
||||
base' = lib.recursiveUpdate base new;
|
||||
result' = g base';
|
||||
in
|
||||
|
|
|
@ -31,18 +31,23 @@ in
|
|||
html = {
|
||||
# TODO: make authors always a list
|
||||
head.meta.authors = if lib.isList config.author then config.author else [ config.author ];
|
||||
head.title.text = lib.mkForce "yeah";
|
||||
body.content = lib.mkForce [
|
||||
(cfg.menus.main.outputs.html config)
|
||||
{
|
||||
section.heading = {
|
||||
# TODO: i18n support
|
||||
# TODO: structured dates
|
||||
before = [{ p.content = "Published ${config.date}"; }];
|
||||
content = config.title;
|
||||
after = [{ p.content = "Written by ${config.author}"; }];
|
||||
section = {
|
||||
heading = {
|
||||
# TODO: i18n support
|
||||
# TODO: structured dates
|
||||
before = [{ p.content = "Published ${config.date}"; }];
|
||||
content = config.title;
|
||||
after = [{ p.content = "Written by ${config.author}"; }];
|
||||
};
|
||||
content = [
|
||||
(cfg.templates.html.markdown { inherit (config) name body; })
|
||||
];
|
||||
};
|
||||
}
|
||||
(cfg.templates.html.markdown { inherit (config) name body; })
|
||||
];
|
||||
};
|
||||
});
|
||||
|
|
|
@ -64,8 +64,14 @@ in
|
|||
};
|
||||
body.content = [
|
||||
(cfg.menus.main.outputs.html page)
|
||||
{ section.heading.content = page.title; }
|
||||
(cfg.templates.html.markdown { inherit (page) name body; })
|
||||
{
|
||||
section = {
|
||||
heading.content = page.title;
|
||||
content = [
|
||||
(cfg.templates.html.markdown { inherit (page) name body; })
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
});
|
||||
|
|
Reference in a new issue