| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
MathiasSM.Theme
Description
Resolving content-provided themes: templates and styles that override the vendored defaults, file by file.
Synopsis
- discoverContentTemplateNames :: FilePath -> IO [FilePath]
- rewritePartials :: SiteConfig -> String -> String
- rewritingTemplateCompiler :: SiteConfig -> Compiler (Item Template)
- applyContentAsTemplate :: SiteConfig -> Context String -> Item String -> Compiler (Item String)
Documentation
discoverContentTemplateNames :: FilePath -> IO [FilePath] Source #
Lists the template names a content dir provides (empty when the dir is absent).
rewritePartials :: SiteConfig -> String -> String Source #
Rewrites every $partial("templates/name")$ to the identifier resolveTemplate
picks; any other $partial$ (e.g. $partial("content/…")$) is left untouched.
rewritingTemplateCompiler :: SiteConfig -> Compiler (Item Template) Source #
Compiles a template, rewriting its $partial("templates/…")$ paths through
the override map so content-provided partials are picked up.
applyContentAsTemplate :: SiteConfig -> Context String -> Item String -> Compiler (Item String) Source #
Applies a content body as a template, rewriting its $partial("templates/…")$
paths through the override map first, so templated posts and pages resolve
content-provided partials just like template files do.