From 0f97b7a64fa3733689b713a2210a4f7b64e069d7 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Thu, 15 Jun 2023 15:05:51 +0200 Subject: add local anchors to headers --- site.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'site.hs') diff --git a/site.hs b/site.hs index 8626fa3..e634f05 100644 --- a/site.hs +++ b/site.hs @@ -178,7 +178,9 @@ installPage mount pi = do fixedUrlDoc <- walkURLs (processLink $ pi ^. pagePath . to takeDirectory) $ pi ^. pageDoc checkTarget file - body <- io . runIOorExplode $ writeHtml5String htmlWriteOpts fixedUrlDoc + body <- + io . runIOorExplode $ writeHtml5String htmlWriteOpts $ + addHeadingLinks "header-local-anchor" fixedUrlDoc let Y.Object meta' = pi ^. pageMeta meta = Y.Object $ KM.insert "body" (Y.String body) meta' meta <- addGlobalMeta meta >>= addPageMeta pi -- cgit v1.2.3