shakebook-0.5.1.0: Shake-based technical documentation generator; HTML & PDF

Safe HaskellNone
LanguageHaskell2010

Shakebook.Data

Synopsis

Documentation

newtype PathDisplay a t Source #

Constructors

PathDisplay (Path a t) 
Instances
Display (PathDisplay a t) Source # 
Instance details

Defined in Shakebook.Data

newtype WithinDisplay a t Source #

Constructors

WithinDisplay (Within a t) 
Instances
Display [WithinDisplay a (Path b t)] Source # 
Instance details

Defined in Shakebook.Data

Methods

display :: [WithinDisplay a (Path b t)] -> Utf8Builder #

textDisplay :: [WithinDisplay a (Path b t)] -> Text #

Display (WithinDisplay a (Path b t)) Source # 
Instance details

Defined in Shakebook.Data

viewContent :: Value -> Text Source #

View the "content" field of a JSON value.

withContent :: Text -> Value -> Value Source #

Add "content" field from input Text.

viewSrcPath :: Value -> Text Source #

View the "src-path" field of a JSON Value.

withSrcPath :: Text -> Value -> Value Source #

Add "src-path" field based on input Text.

viewBaseUrl :: Value -> Text Source #

View the "base-url" of a JSON Value.

withBaseUrl :: Text -> Value -> Value Source #

Add "base-url" field from input Text.

viewFullUrl :: Value -> Text Source #

View the "full-url" of a JSON Value.

withFullUrl :: Text -> Value -> Value Source #

Add "full-url" field from input Text.

viewImage :: Value -> Text Source #

View the "image" field of a JSON vaule.

viewUrl :: Value -> Text Source #

View the "url" field of a JSON Value.

withUrl :: Text -> Value -> Value Source #

Add "url" field from input Text.

toGroundedUrl :: Path Rel File -> Text Source #

Add a leading slash to a `Path Rel File` to turn it into a url as Text.

generateSupposedUrl :: MonadThrow m => Path Rel File -> m Text Source #

Generate a "supposed" url, the grounded version of the markdown source path.

loadMarkdownAsJSON :: (MonadAction m, MonadThrow m) => ReaderOptions -> WriterOptions -> Within Rel (Path Rel File) -> m Value Source #

Get a JSON Value of Markdown Data with markdown body as "contents" field and the srcPath as "srcPath" field.