-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Static site generator using Shake
--
-- Haskell static site generator that aims to reuse existing libraries
-- instead of reinventing the wheel
@package rib
@version 0.7.0.0
-- | Some commonly useful CSS styles
module Rib.Extra.CSS
-- | Stock CSS for the kbd element
--
-- Based on the MDN demo at,
-- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd
mozillaKbdStyle :: Css
-- | Combinators for working with Shake.
module Rib.Shake
-- | Shake action to copy static files as is.
buildStaticFiles :: [Path Rel File] -> Action ()
-- | Run the given action when any file matching the patterns changes
forEvery :: [Path Rel File] -> (Path Rel File -> Action a) -> Action [a]
-- | Write the given file unless it has not changed.
--
-- Also, always writes under ribOutputDir
writeFileCached :: Path Rel File -> String -> 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]
-- | Type-safe routes
module Rib.Route
-- | A route is a GADT representing individual routes.
--
-- The GADT type parameter represents the data used to render that
-- particular route.
class IsRoute (r :: Type -> Type)
-- | Return the filepath (relative ribInputDir) where the generated
-- content for this route should be written.
routeFile :: (IsRoute r, MonadThrow m) => r a -> m (Path Rel File)
-- | The absolute URL to this route (relative to site root)
routeUrl :: IsRoute r => r a -> Text
-- | The relative URL to this route
routeUrlRel :: IsRoute r => r a -> Text
-- | Write the content s to the file corresponding to the given
-- route.
writeRoute :: (IsRoute r, ToString s) => r a -> s -> Action ()
-- | Helpers for working with Pandoc documents
module Rib.Parser.Pandoc
-- | Parse a lightweight markup language using Pandoc
parse :: (ReaderOptions -> Text -> PandocIO Pandoc) -> Path Rel File -> Action Pandoc
-- | Pure version of parse
parsePure :: (ReaderOptions -> Text -> PandocPure Pandoc) -> 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
-- | Parse Markdown using mmark
parse :: Path Rel File -> Action MMark
-- | Pure version of parse
parsePure :: FilePath -> Text -> Either Text MMark
-- | Like parse but takes a custom list of MMark extensions
parseWith :: [Extension] -> Path Rel File -> Action MMark
-- | Like parsePure but takes a custom list of MMark extensions
parsePureWith :: [Extension] -> FilePath -> Text -> Either Text MMark
defaultExts :: [Extension]
-- | 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
-- | Parser for Dhall files.
module Rib.Parser.Dhall
-- | Parse a Dhall file as Haskell type.
--
-- Use makeHaskellTypes to create the Haskell type first.
parse :: FromDhall a => [Path Rel File] -> Path Rel File -> Action a
-- | 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
module Rib
-- | 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