rib-0.6.0.0: Static site generator using Shake

Safe HaskellNone
LanguageHaskell2010

Rib.Shake

Contents

Description

Combinators for working with Shake.

Synopsis

Basic helpers

buildStaticFiles :: [Path Rel File] -> Action () Source #

Shake action to copy static files as is.

buildHtmlMulti Source #

Arguments

:: SourceReader repr

How to parse the source file

-> [Path Rel File]

Source file patterns (relative to ribInputDir)

-> (Source repr -> Html ())

How to render the given source to HTML

-> Action [Source repr]

Result

Convert the given pattern of source files into their HTML.

buildHtml Source #

Arguments

:: SourceReader repr 
-> Path Rel File

Path to the output HTML file (relative to ribOutputDir)

-> Path Rel File

Path to the source file (relative to ribInputDir)

-> (Source repr -> Html ()) 
-> Action (Source repr) 

Like buildHtmlMulti but operate on a single file.

Also explicitly takes the output file path.

buildHtml_ :: SourceReader repr -> Path Rel File -> Path Rel File -> (Source repr -> Html ()) -> Action () Source #

Like buildHtml but discards its result.

Reading only

readSource Source #

Arguments

:: SourceReader repr

How to parse the source

-> Path Rel File

Path to the source file (relative to ribInputDir)

-> Action repr 

Read and parse an individual source file

Writing only

writeHtml :: Path Rel File -> Html () -> Action () Source #

Write a single HTML file with the given HTML value

The HTML text value will be cached, so subsequent writes of the same value will be skipped.

Misc

data RibSettings Source #

RibSettings is initialized with the values passed to run

ribInputDir :: Action (Path Rel Dir) Source #

Input directory containing source files

This is same as the first argument to run