hakyll-4.5.0.0: A static website compiler library

Safe HaskellNone

Hakyll.Web.Pandoc

Contents

Description

Module exporting convenient pandoc bindings

Synopsis

The basic building blocks

readPandocSource

Arguments

:: Item String

String to read

-> Item Pandoc

Resulting document

Read a string using pandoc, with the default options

readPandocWithSource

Arguments

:: ReaderOptions

Parser options

-> Item String

String to read

-> Item Pandoc

Resulting document

Read a string using pandoc, with the supplied options

writePandocSource

Arguments

:: Item Pandoc

Document to write

-> Item String

Resulting HTML

Write a document (as HTML) using pandoc, with the default options

writePandocWithSource

Arguments

:: WriterOptions

Writer options for pandoc

-> Item Pandoc

Document to write

-> Item String

Resulting HTML

Write a document (as HTML) using pandoc, with the supplied options

renderPandoc :: Item String -> Item StringSource

Render the resource using pandoc

renderPandocWith :: ReaderOptions -> WriterOptions -> Item String -> Item StringSource

Render the resource using pandoc

Derived compilers

pandocCompiler :: Compiler (Item String)Source

Read a page render using pandoc

pandocCompilerWith :: ReaderOptions -> WriterOptions -> Compiler (Item String)Source

A version of pandocCompiler which allows you to specify your own pandoc options

pandocCompilerWithTransform :: ReaderOptions -> WriterOptions -> (Pandoc -> Pandoc) -> Compiler (Item String)Source

An extension of pandocCompilerWith which allows you to specify a custom pandoc transformation for the content

pandocCompilerWithTransformM :: ReaderOptions -> WriterOptions -> (Pandoc -> Compiler Pandoc) -> Compiler (Item String)Source

Similar to pandocCompilerWithTransform, but the transformation function is monadic. This is useful when you want the pandoc transformation to use the Compiler information such as routes, metadata, etc

Default options

defaultHakyllReaderOptions :: ReaderOptionsSource

The default reader options for pandoc parsing in hakyll

defaultHakyllWriterOptions :: WriterOptionsSource

The default writer options for pandoc rendering in hakyll