rib-0.3.0.0: Static site generator using Shake

Safe HaskellNone
LanguageHaskell2010

Rib.Shake

Contents

Description

Combinators for working with Shake.

The functions in this module work with ribInputDir and ribOutputDir.

See the source of buildAction for example usage.

Synopsis

Basic helpers

buildHtmlMulti Source #

Arguments

:: (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 #

Arguments

:: (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 #

Arguments

:: (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

Misc

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

Shake action to copy static files as is