From 897acd2a5c410dc6f8058d76dc7af96181691715 Mon Sep 17 00:00:00 2001 From: valentin gagarin Date: Wed, 13 Nov 2024 15:24:41 +0100 Subject: [PATCH] fix semantics: wrap content body into section --- website/structure/article.nix | 18 +++++++++++------- website/structure/page.nix | 10 ++++++++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/website/structure/article.nix b/website/structure/article.nix index bf4c6ab..bf07ebc 100644 --- a/website/structure/article.nix +++ b/website/structure/article.nix @@ -34,15 +34,19 @@ in 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; }) ]; }; }); diff --git a/website/structure/page.nix b/website/structure/page.nix index 8d255c1..6c20719 100644 --- a/website/structure/page.nix +++ b/website/structure/page.nix @@ -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; }) + ]; + }; + } ]; }; });