aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-08-15 13:43:39 +0200
committerMirek Kratochvil <exa.exa@gmail.com>2023-08-15 13:43:39 +0200
commit800969bed46084c413b22904ba896e4559f4aa4c (patch)
tree1e88143d54ab16457d2c98a8a784b6b0e4479987
parentb4bbc0f1b3e20bd21210c7786880d0fc337303b8 (diff)
downloadreploy-800969bed46084c413b22904ba896e4559f4aa4c.tar.gz
reploy-800969bed46084c413b22904ba896e4559f4aa4c.tar.bz2
fix a few docs
-rw-r--r--reploy.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/reploy.hs b/reploy.hs
index 2e3ee48..ca1b663 100644
--- a/reploy.hs
+++ b/reploy.hs
@@ -15,7 +15,7 @@
-}
{-# LANGUAGE OverloadedStrings #-}
--- | The main deployment script.
+-- | The main site deployment executable.
module Main where
import Control.Monad ((>=>), filterM, join, unless, when)
@@ -450,7 +450,9 @@ makePageLinkMeta mount = do
meta <- use $ pages . to (M.! mount) . pageMeta
pure $ Y.object [("href", fromString link), ("meta", meta)]
--- | Create the complete metadata structure for the template that renders a given categorical tag pages
+-- | Like `makeTagMeta`, but returns only plain YAML without the functions (in
+-- outcome the result is easier to work with using the YAML machinery,
+-- allowing this to recurse to itself).
makeTagMeta' :: [String] -> Site Y.Value
makeTagMeta' tag = do
taggedPages <- use $ htags . to (M.!? tag) . to (maybe [] id)
@@ -474,6 +476,7 @@ makeTagMeta' tag = do
, ("listhref", fromString listlink)
]
+-- | Create the complete metadata structure for the template that renders a given categorical tag pages
makeTagMeta :: [String] -> Site MT.Value
makeTagMeta tag = makeTagMeta' tag >>= addGlobalMeta