Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PathDisplay a t = PathDisplay (Path a t)
- newtype WithinDisplay a t = WithinDisplay (Within a t)
- viewContent :: Value -> Text
- withContent :: Text -> Value -> Value
- viewSrcPath :: Value -> Text
- withSrcPath :: Text -> Value -> Value
- viewBaseUrl :: Value -> Text
- withBaseUrl :: Text -> Value -> Value
- viewFullUrl :: Value -> Text
- withFullUrl :: Text -> Value -> Value
- viewImage :: Value -> Text
- viewUrl :: Value -> Text
- withUrl :: Text -> Value -> Value
- toGroundedUrl :: Path Rel File -> Text
- generateSupposedUrl :: MonadThrow m => Path Rel File -> m Text
- loadMarkdownAsJSON :: (MonadAction m, MonadThrow m) => ReaderOptions -> WriterOptions -> Within Rel (Path Rel File) -> m Value
Documentation
newtype PathDisplay a t Source #
PathDisplay (Path a t) |
Instances
Display (PathDisplay a t) Source # | |
Defined in Shakebook.Data display :: PathDisplay a t -> Utf8Builder # textDisplay :: PathDisplay a t -> Text # |
newtype WithinDisplay a t Source #
WithinDisplay (Within a t) |
Instances
Display [WithinDisplay a (Path b t)] Source # | |
Defined in Shakebook.Data display :: [WithinDisplay a (Path b t)] -> Utf8Builder # textDisplay :: [WithinDisplay a (Path b t)] -> Text # | |
Display (WithinDisplay a (Path b t)) Source # | |
Defined in Shakebook.Data display :: WithinDisplay a (Path b t) -> Utf8Builder # textDisplay :: WithinDisplay a (Path b t) -> Text # |
viewContent :: Value -> Text Source #
View the "content" field of a JSON value.
viewSrcPath :: Value -> Text Source #
View the "src-path" field of a JSON Value.
viewBaseUrl :: Value -> Text Source #
View the "base-url" of a JSON Value.
viewFullUrl :: Value -> Text Source #
View the "full-url" of a JSON Value.
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.