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