-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Static site generator using Shake
--
-- Haskell library for writing your own static site generator
@package rib
@version 0.6.0.0
module Rib.Source
-- | A source file on disk
data Source repr
Source :: Path Rel File -> Path Rel File -> repr -> Source repr
[_source_path] :: Source repr -> Path Rel File
-- | Path to the generated HTML file (relative to ribOutputDir)
[_source_builtPath] :: Source repr -> Path Rel File
[_source_val] :: Source repr -> repr
-- | A function that parses a source representation out of the given file
type SourceReader repr = forall b. Path b File -> Action (Either Text repr)
-- | Path to the source file (relative to ribInputDir)
sourcePath :: Source repr -> Path Rel File
-- | Relative URL to the generated source HTML.
sourceUrl :: Source repr -> Text
-- | Parsed representation of the source.
sourceVal :: Source repr -> repr
instance GHC.Base.Functor Rib.Source.Source
instance GHC.Generics.Generic (Rib.Source.Source repr)
-- | Combinators for working with Shake.
module Rib.Shake
-- | Shake action to copy static files as is.
buildStaticFiles :: [Path Rel File] -> Action ()
-- | Convert the given pattern of source files into their HTML.
buildHtmlMulti :: SourceReader repr -> [Path Rel File] -> (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 repr)
-- | Like buildHtml but discards its result.
buildHtml_ :: SourceReader repr -> Path Rel File -> Path Rel File -> (Source repr -> Html ()) -> Action ()
-- | Read and parse an individual source file
readSource :: SourceReader repr -> Path Rel File -> Action repr
-- | 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.
writeHtml :: Path Rel File -> Html () -> Action ()
-- | RibSettings is initialized with the values passed to run
data RibSettings
RibSettings :: Path Rel Dir -> Path Rel Dir -> RibSettings
[_ribSettings_inputDir] :: RibSettings -> Path Rel Dir
[_ribSettings_outputDir] :: RibSettings -> Path Rel Dir
-- | Input directory containing source files
--
-- This is same as the first argument to run
ribInputDir :: Action (Path Rel Dir)
ribOutputDir :: Action (Path Rel Dir)
-- | Like getDirectoryFiles but works with Path
getDirectoryFiles' :: Path b Dir -> [Path Rel File] -> Action [Path Rel File]
-- | CLI interface for Rib.
--
-- Mostly you would only need run, passing it your Shake build
-- action.
module Rib.App
-- | Application modes
--
-- The mode in which to run the Rib CLI
data App
-- | Generate static files once.
Generate :: Bool -> App
-- | Force a full generation of all files even if they were not
-- modified
[full] :: App -> Bool
-- | Watch for changes in the input directory and run Generate
WatchAndGenerate :: App
-- | Run a HTTP server serving content from the output directory
Serve :: Int -> Bool -> App
-- | Port to bind the server
[port] :: App -> Int
-- | Unless set run WatchAndGenerate automatically
[dontWatch] :: App -> Bool
-- | Run Rib using arguments passed in the command line.
run :: Path Rel Dir -> Path Rel Dir -> Action () -> IO ()
-- | Like run but with an explicitly passed App mode
runWith :: Path Rel Dir -> Path Rel Dir -> Action () -> App -> IO ()
instance GHC.Classes.Eq Rib.App.App
instance GHC.Show.Show Rib.App.App
instance Data.Data.Data Rib.App.App
-- | Helpers for working with Pandoc documents
module Rib.Parser.Pandoc
-- | SourceReader for parsing a lightweight markup language using
-- Pandoc
parse :: (ReaderOptions -> Text -> PandocIO Pandoc) -> SourceReader Pandoc
-- | Pure version of parse
parsePure :: (ReaderOptions -> Text -> PandocPure Pandoc) -> Text -> Either Text Pandoc
-- | Render a Pandoc document to HTML
render :: Pandoc -> Html ()
-- | Render a list of Pandoc Inline values as Lucid HTML
--
-- Useful when working with Meta values from the document
-- metadata.
renderPandocInlines :: [Inline] -> Html ()
-- | Extract the Pandoc metadata as JSON value
extractMeta :: Pandoc -> Maybe (Either Text Value)
-- | Get the top-level heading as Lucid HTML
getH1 :: Pandoc -> Maybe (Html ())
-- | Get the first image in the document if one exists
getFirstImg :: Pandoc -> Maybe Text
data Pandoc
-- | Parsing Markdown using the mmark parser.
module Rib.Parser.MMark
-- | SourceReader for parsing Markdown using mmark
parse :: SourceReader MMark
-- | Pure version of parse
parsePure :: FilePath -> Text -> Either Text MMark
-- | Render a MMark document as HTML
render :: MMark -> Html ()
-- | Get the first image in the document if one exists
getFirstImg :: MMark -> Maybe URI
-- | Extract contents of an optional YAML block that may have been parsed.
projectYaml :: MMark -> Maybe Value
-- | Representation of complete markdown document. You can't look inside of
-- MMark on purpose. The only way to influence an MMark
-- document you obtain as a result of parsing is via the extension
-- mechanism.
data MMark
module Rib
-- | A source file on disk
data Source repr
-- | A function that parses a source representation out of the given file
type SourceReader repr = forall b. Path b File -> Action (Either Text repr)
-- | Path to the source file (relative to ribInputDir)
sourcePath :: Source repr -> Path Rel File
-- | Parsed representation of the source.
sourceVal :: Source repr -> repr
-- | Relative URL to the generated source HTML.
sourceUrl :: Source repr -> Text
-- | Representation of complete markdown document. You can't look inside of
-- MMark on purpose. The only way to influence an MMark
-- document you obtain as a result of parsing is via the extension
-- mechanism.
data MMark
data Pandoc