hakyll-0.4.1: A simple static site generator library.Source codeContentsIndex
Text.Hakyll.Context
Description
Module containing various functions to manipulate contexts.
Synopsis
type ContextManipulation = Context -> Context
renderValue :: String -> String -> (ByteString -> ByteString) -> ContextManipulation
renderDate :: String -> String -> String -> ContextManipulation
Documentation
type ContextManipulation = Context -> ContextSource
Type for context manipulating functions.
renderValueSource
:: StringKey of which the value should be copied.
-> StringKey the value should be copied to.
-> ByteString -> ByteStringFunction to apply on the value.
-> ContextManipulation
Do something with a value of a context.
renderDateSource
:: StringKey in which the rendered date should be placed.
-> StringFormat to use on the date.
-> StringDefault value when the date cannot be parsed.
-> ContextManipulation
When the context has a key called path in a `yyyy-mm-dd-title.extension` format (default for pages), this function can render the date.
Produced by Haddock version 2.6.0