Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- module Rib.App
- module Rib.Shake
- serve :: Int -> FilePath -> IO ()
- data Document repr meta
- documentPath :: Document repr meta -> Path Rel File
- documentVal :: Document repr meta -> repr
- documentHtml :: Document repr meta -> Html ()
- documentMeta :: Document repr meta -> meta
- documentUrl :: Document repr meta -> Text
- data MMark
- renderMarkdown :: Text -> Html ()
- data Pandoc
- renderPandoc :: Path Rel File -> Text -> Html ()
Documentation
module Rib.App
module Rib.Shake
Run a HTTP server to serve a directory of static files
Allow URLs of the form /foo/bar
to serve ${path}/foo/bar.html
data Document repr meta Source #
A document written in a lightweight markup language (LML)
The type variable repr
indicates the representation type of the Markup
parser to be used.
Instances
(Show repr, Show meta) => Show (Document repr meta) Source # | |
Generic (Document repr meta) Source # | |
type Rep (Document repr meta) Source # | |
Defined in Rib.Document type Rep (Document repr meta) = D1 (MetaData "Document" "Rib.Document" "rib-0.5.0.0-inplace" False) (C1 (MetaCons "Document" PrefixI True) ((S1 (MetaSel (Just "_document_path") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path Rel File)) :*: S1 (MetaSel (Just "_document_val") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 repr)) :*: (S1 (MetaSel (Just "_document_html") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Html ())) :*: S1 (MetaSel (Just "_document_meta") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 meta)))) |
documentVal :: Document repr meta -> repr Source #
documentHtml :: Document repr meta -> Html () Source #
documentMeta :: Document repr meta -> meta Source #
documentUrl :: Document repr meta -> Text Source #
Return the URL for the given .html
file under serve directory
File path must be relative to the serve directory.
You may also pass source paths as long as they map directly to destination path except for file extension.
renderMarkdown :: Text -> Html () Source #
Parse and render the markup directly to HTML
Instances
Eq Pandoc | |
Data Pandoc | |
Defined in Text.Pandoc.Definition gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pandoc -> c Pandoc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pandoc # toConstr :: Pandoc -> Constr # dataTypeOf :: Pandoc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pandoc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pandoc) # gmapT :: (forall b. Data b => b -> b) -> Pandoc -> Pandoc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pandoc -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pandoc -> r # gmapQ :: (forall d. Data d => d -> u) -> Pandoc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pandoc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pandoc -> m Pandoc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pandoc -> m Pandoc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pandoc -> m Pandoc # | |
Ord Pandoc | |
Read Pandoc | |
Show Pandoc | |
Generic Pandoc | |
Semigroup Pandoc | |
Monoid Pandoc | |
ToJSON Pandoc | |
Defined in Text.Pandoc.Definition | |
FromJSON Pandoc | |
NFData Pandoc | |
Defined in Text.Pandoc.Definition | |
HasMeta Pandoc | |
Defined in Text.Pandoc.Builder | |
Walkable Block Pandoc | |
Walkable Inline Pandoc | |
Walkable Pandoc Pandoc | |
Walkable [Block] Pandoc | |
Walkable [Inline] Pandoc | |
type Rep Pandoc | |
Defined in Text.Pandoc.Definition type Rep Pandoc = D1 (MetaData "Pandoc" "Text.Pandoc.Definition" "pandoc-types-1.17.6.1-CRDWk7nUpqxLSahMa8Udqw" False) (C1 (MetaCons "Pandoc" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Meta) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Block]))) |