pencil-1.0.1: Static site generator

Safe HaskellNone
LanguageHaskell2010

Pencil.Content.Nodes

Description

Internal functions that deal with nodes.

Synopsis

Documentation

evalNodes :: Env -> [PNode] -> PencilApp [PNode] Source #

Evaluate the nodes in the given environment. Note that it returns an IO because of ${partial(..)} calls that requires us to load a file.

parseAndConvertTextFiles :: FilePath -> PencilApp (Text, [PNode]) Source #

Loads and parses the given file path. Converts Markdown files to HTML, compiles Sass files into CSS, and leaves everything else alone.

loadTextFile :: FilePath -> PencilApp Text Source #

Loads the given file as a text file. Throws an exception into the ExceptT monad transformer if the file is not a text file.

readMarkdownWriteHtml :: PandocMonad m => ReaderOptions -> WriterOptions -> Text -> m Text Source #

Converts Markdown to HTML using the given options.