hakyll-0.3.1: A simple static site generator library.Source codeContentsIndex
data Page
fromContext :: Context -> Page
getValue :: String -> Page -> ByteString
copyValueWith :: String -> String -> (ByteString -> ByteString) -> Page -> Page
getBody :: Page -> ByteString
readPage :: FilePath -> IO Page
writePage :: Page -> IO ()
data Page Source
A Page is basically key-value mapping. Certain keys have special meanings, like for example url, body and title.
show/hide Instances
fromContext :: Context -> PageSource
Create a Page from a key-value mapping.
getValue :: String -> Page -> ByteStringSource
Obtain a value from a page. Will resturn an empty string when nothing is found.
:: StringKey of which the value should be copied.
-> StringKey the value should be copied to.
-> ByteString -> ByteStringFunction to apply on the value.
-> PagePage on which to apply this modification.
-> PageResult.
Do something with a value of the page.
getBody :: Page -> ByteStringSource
Get the body for a certain page. When not defined, the body will be empty.
readPage :: FilePath -> IO PageSource
Read a page from a file. Metadata is supported, and if the filename has a .markdown extension, it will be rendered using pandoc. Note that pages are not templates, so they should not contain $identifiers.
writePage :: Page -> IO ()Source
Write a page to the site destination.
Produced by Haddock version 2.6.0