hakyll-3.4.1.0: A static website compiler library

Safe HaskellSafe-Infered

Hakyll

Description

Top-level module exporting all modules that are interesting for the user

Synopsis

Documentation

unixFilterSource

Arguments

:: String

Program name

-> [String]

Program args

-> Compiler String String

Resulting compiler

Use a unix filter as compiler. For example, we could use the rev program as a compiler.

 rev :: Compiler Resource String
 rev = getResourceString >>> unixFilter "rev" []

A more realistic example: one can use this to call, for example, the sass compiler on CSS files. More information about sass can be found here:

http://sass-lang.com/

The code is fairly straightforward, given that we use .scss for sass:

 match "style.scss" $ do
     route   $ setExtension "css"
     compile $ getResourceString >>> unixFilter "sass" ["-s", "--scss"]
                                 >>> arr compressCss

unixFilterLBSSource

Arguments

:: String

Program name

-> [String]

Program args

-> Compiler ByteString ByteString

Resulting compiler

Variant of unixFilter that should be used for binary files

 match "music.wav" $ do
     route   $ setExtension "ogg"
     compile $ getResourceLBS >>> unixFilter "oggenc" ["-"]