shakebook-0.3.0.1: 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 t => Display [WithinDisplay a t] Source # 
Instance details

Defined in Shakebook.Data

Display t => Display (WithinDisplay a t) Source # 
Instance details

Defined in Shakebook.Data

class HasSbConfig a where Source #

Instances
HasSbConfig ShakebookEnv Source # 
Instance details

Defined in Shakebook.Data

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.

enrichFullUrl :: Text -> Value -> Value Source #

Assuming a "url" field, enrich via a baseURL

enrichUrl :: (Text -> Text) -> Value -> Value Source #

Assuming a 'src-path' field, enrich using withUrl using a Text -> Text transformation.

loadMarkdownAsJSON :: (MonadReader r m, HasSbConfig r, MonadAction m, MonadThrow m) => 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.