hakyll-1.0.1: A simple static site generator library.

Text.Hakyll.Context

Description

Module containing various functions to manipulate contexts.

Synopsis

Documentation

type Context = Map String StringSource

Type for a context.

type ContextManipulation = Context -> ContextSource

Type for context manipulating functions.

renderValueSource

Arguments

:: String

Key of which the value should be copied.

-> String

Key the value should be copied to.

-> (String -> String)

Function to apply on the value.

-> ContextManipulation 

Do something with a value of a context.

renderDateSource

Arguments

:: String

Key in which the rendered date should be placed.

-> String

Format to use on the date.

-> String

Default 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.