rib- Static site generator using Shake

Safe HaskellNone




Combinators for working with Shake.

The functions in this module work with ribInputDir and ribOutputDir.

See the source of buildAction for example usage.


Basic helpers

buildHtmlMulti Source #


:: (FilePattern, ReaderOptions -> Text -> PandocIO Pandoc)

Source file patterns & their associated Pandoc readers

-> ((FilePath, Pandoc) -> Html ())

How to render the given Pandoc document to HTML

-> Action [(FilePath, Pandoc)]

List of relative path to generated HTML and the associated Pandoc document

Convert the given pattern of source files into their HTML.

buildHtml :: FilePath -> Html () -> Action () Source #

Build a single HTML file with the given value

Read helpers

readPandoc Source #


:: (ReaderOptions -> Text -> PandocIO Pandoc)

Document format. Example: readMarkdown

-> FilePath 
-> Action Pandoc 

Read and parse a Pandoc source document

If an associated metadata file exists (same filename, with .yaml as extension), use it to specify the metadata of the document.

readPandocMulti Source #


:: (FilePattern, ReaderOptions -> Text -> PandocIO Pandoc)

Tuple of pattern of files to work on and document format.

-> Action [(FilePath, Pandoc)] 

Like readPandoc but operates on multiple files


buildStaticFiles :: [FilePattern] -> Action [FilePath] Source #

Shake action to copy static files as is