Copyright | (c) Chris Penner 2019 |
---|---|
License | BSD3 |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- slick :: Action () -> IO ()
- slickWithOpts :: ShakeOptions -> Action () -> IO ()
- markdownToHTML :: Text -> Action Value
- markdownToHTML' :: FromJSON a => Text -> Action a
- orgModeToHTML :: Text -> Action Value
- orgModeToHTML' :: FromJSON a => Text -> Action a
- compileTemplate' :: FilePath -> Action Template
- substitute :: ToMustache k => Template -> k -> Text
- getDirectoryPaths :: [FilePath] -> [FilePath] -> Action [FilePath]
- convert :: (FromJSON a, ToJSON a, FromJSON b) => a -> Action b
Slick
This module re-exports the basics you need to run slick. For more complex tasks look into Slick.Pandoc.
To get started use the Slick Template.
Basics
slick :: Action () -> IO () Source #
Build your slick site. This is a good candidate for your main
function.
Calls through to shakeArgsForward
with extra verbosity
slickWithOpts :: ShakeOptions -> Action () -> IO () Source #
Build your slick site with the provided shake options. This is a good candidate for your main
function.
| Calls through to shakeArgsForward
with the provided options
markdownToHTML' :: FromJSON a => Text -> Action a Source #
Like markdownToHTML
but allows returning any JSON serializable object
orgModeToHTML' :: FromJSON a => Text -> Action a Source #
Like orgModeToHTML
but allows returning any JSON compatible object.
Mustache Templating
compileTemplate' :: FilePath -> Action Template Source #
Like compileTemplate
from mustache but tracks changes to template files and partials within Shake for cache-busting.
substitute :: ToMustache k => Template -> k -> Text #
Substitutes all mustache defined tokens (or tags) for values found in the provided data structure.
Equivalent to substituteValue . toMustache
.
Utils
Given a list of extensions and directories, find all files that match, and return full paths.