-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Shake-based technical documentation generator; HTML & PDF
--
-- Shakebook is a documentation generator aimed at covering all the bases
-- for mathematical, technical and scientific diagrams and typesetting.
-- Shakebook provides combinators for taking markdown files and combining
-- them into documents, but allowing the user to control how. Shakebook
-- provides general combinators for templating single pages, cofree
-- comonads for representing tables of contents, and zipper comonads for
-- representing pagers.
@package shakebook
@version 0.7.3.0
module Shakebook.Mustache
-- | A compiled Template with metadata.
data Template
-- | Build a single page straight from a template.
buildPageAction :: MonadAction m => Path Rel File -> Value -> Path Rel File -> m ()
-- | Like buildPageAction, but uses Within values.
buildPageActionWithin :: MonadAction m => Within Rel (Path Rel File) -> Value -> Within Rel (Path Rel File) -> m ()
-- | Lifted version of compileTemplate' with well-typed Path.
compileTemplate' :: MonadAction m => Path Rel File -> m Template
module Shakebook.Pandoc
-- | Natural transformation from PandocIO to a MonadAction
runPandocA :: (MonadAction m, MonadThrow m) => PandocIO a -> m a
newtype PandocActionException
PandocActionException :: String -> PandocActionException
-- | Read a markdown file as an Action.
readMDFile :: (MonadAction m, MonadThrow m) => ReaderOptions -> Path Rel File -> m Pandoc
-- | Read a markdown file as an Action.
readMDFileIn :: (MonadAction m, MonadThrow m) => ReaderOptions -> Path Rel Dir -> Path Rel File -> m Pandoc
-- | Like readMDFile but accepts a Within
readMDFileWithin :: (MonadAction m, MonadThrow m) => ReaderOptions -> Within Rel (Path Rel File) -> m Pandoc
-- | Find all the images in a Pandoc data structure and call
-- need on them.
needPandocImagesIn :: (MonadAction m, MonadThrow m) => Path Rel Dir -> Pandoc -> m ()
-- | Make a pdflatex in an Action.
makePDFLaTeX :: (MonadAction m, MonadThrow m) => WriterOptions -> Pandoc -> m ByteString
-- | Precarious function that demotes Header numbers within the Pandoc
-- according to its depth in the Cofree. This is so that Headers that H1s
-- that would correctly display for an HTML page will be lower in the
-- table of contents in the PDF equivalent.
progressivelyDemoteHeaders :: Cofree [] Pandoc -> Cofree [] Pandoc
-- | For a list of file extensions, replace the images with an Inline based
-- on its src path.
replaceUnusableImages :: MonadThrow m => [String] -> (Text -> Inline) -> Pandoc -> m Pandoc
-- | Prefix all images in a Pandoc with a directory.
prefixAllImages :: Path Rel Dir -> Pandoc -> Pandoc
-- | Flatten a pandoc Meta object to a Value.
flattenMeta :: MonadAction m => (Pandoc -> PandocIO Text) -> Meta -> m Value
-- | View the "content" field of a JSON value.
viewContent :: ToJSON a => a -> Text
-- | View the "src-path" field of a JSON Value.
viewSrcPath :: ToJSON a => a -> Text
-- | View the "url" field of a JSON Value.
viewUrl :: ToJSON a => a -> Text
-- | Get a JSON Value of Markdown Data with markdown body as "contents"
-- field and the srcPath as "srcPath" field.
loadMarkdownAsJSON :: (MonadAction m, MonadThrow m) => ReaderOptions -> WriterOptions -> Within Rel (Path Rel File) -> m Value
instance GHC.Classes.Eq Shakebook.Pandoc.PandocActionException
instance GHC.Show.Show Shakebook.Pandoc.PandocActionException
instance GHC.Exception.Type.Exception Shakebook.Pandoc.PandocActionException
-- | Conventions used for common shakebook projects, lenses, enrichments,
-- affixes.
module Shakebook.Conventions
-- | View the "image" field of a JSON value.
viewImage :: ToJSON a => a -> Text
-- | View the "modified" field of a JSON value.
viewModified :: ToJSON a => a -> UTCTime
-- | View the "date" field of a JSON Value as a UTCTime.
viewPostTime :: ToJSON a => a -> UTCTime
-- | View the "date" field of a JSON Value as Text.
viewPostTimeRaw :: ToJSON a => a -> Text
-- | View the "tags" field of a JSON Value as a list.
viewTags :: ToJSON a => a -> [Text]
-- | View the "title" field of a JSON Value.
viewTitle :: ToJSON a => a -> Text
-- | View all post tags for a list of posts.
viewAllPostTags :: ToJSON a => [a] -> [Text]
-- | View all posts times for a list of posts.
viewAllPostTimes :: ToJSON a => [a] -> [UTCTime]
-- | Add "base-url" field from input Text.
withBaseUrl :: Text -> Value -> Value
-- | Add "full-url" field from input Text.
withFullUrl :: Text -> Value -> Value
-- | Add "highlighting-css" field from input Style.
withHighlighting :: Style -> Value -> Value
-- | Add "modified" field from input UTCTime.
withModified :: UTCTime -> Value -> Value
-- | Add "next" field from input Value.
withNext :: ToJSON a => a -> Value -> Value
-- | Add "pages" field from input [Value].
withPages :: ToJSON a => [a] -> Value -> Value
-- | Add "prettydate" field using input Text.
withPrettyDate :: Text -> Value -> Value
-- | Add "previous" field using input Value.
withPrevious :: ToJSON a => a -> Value -> Value
-- | Add "posts" field based on input [Value].
withPosts :: ToJSON a => [a] -> Value -> Value
-- | Add "recent-posts" field using input Value.
withRecentPosts :: ToJSON a => [a] -> Value -> Value
-- | Add "social-links" field based on input [Value].
withSocialLinks :: ToJSON a => [a] -> Value -> Value
-- | Add "site-title" field from input Text.
withSiteTitle :: Text -> Value -> Value
-- | Add "subsections" field based on input [Value].
withSubsections :: ToJSON a => [a] -> Value -> Value
-- | Add "tag-index" field based on input [Value].
withTagIndex :: ToJSON a => [a] -> Value -> Value
-- | Add "tag-links" field based on input [Value].
withTagLinks :: ToJSON a => [a] -> Value -> Value
-- | Add "teaser" field based on input Text.
withTeaser :: Text -> Value -> Value
-- | Add "title" field based on input Text.
withTitle :: Text -> Value -> Value
-- | Assuming a "date" field, enrich using withPrettyDate and a format
-- string.
enrichPrettyDate :: (UTCTime -> Text) -> Value -> Value
-- | Assuming a "tags" field, enrich using withTagLinks.
enrichTagLinks :: (Text -> Text) -> Value -> Value
-- | Assuming a "content" field with a spitter section, enrich using
-- withTeaser
enrichTeaser :: Text -> Value -> Value
-- | Extend a Zipper of Values to add "next" objects.
extendNext :: Zipper [] Value -> Zipper [] Value
-- | Extend a Zipper of Values to add "previous" objects.
extendPrevious :: Zipper [] Value -> Zipper [] Value
-- | Add both "next" and "previous" fields using withPostNext and
-- withPostPrevious
extendNextPrevious :: Zipper [] Value -> Zipper [] Value
-- | Extend a Zipper of Values to add list of "pages" within r hops either
-- side of the focus.
extendPageNeighbours :: Int -> Zipper [] Value -> Zipper [] Value
-- | Create a blog navbar object for a posts section, with layers "toc1",
-- "toc2", and "toc3".
genBlogNavbarData :: IsIndexOf YearMonth ixs => Text -> Text -> (UTCTime -> Text) -> (UTCTime -> Text) -> IxSet ixs Post -> Value
genIndexPageData :: (MonadThrow m, ToJSON a) => [a] -> Text -> (Text -> Text) -> Int -> m (Zipper [] Value)
-- | Create link data object with fields "id" and "url" using an id and a
-- function | transforming an id into a url.
genLinkData :: Text -> Text -> Value
genPageData :: ToJSON a => Text -> (Text -> Text) -> Zipper [] [a] -> Value
-- | Create a toc navbar object for a docs section, with layers "toc1",
-- "toc2" and "toc3".
genTocNavbarData :: Cofree [] Value -> Value
-- | Indexable Post Type
newtype Post
Post :: Value -> Post
[unPost] :: Post -> Value
-- | Tag indices for a Post for use with IxSet.
newtype Tag
Tag :: Text -> Tag
-- | Posted index for a Post for use with IxSet.
newtype Posted
Posted :: UTCTime -> Posted
-- | YearMonth (yyyy, mm) index for a Post for use with
-- IxSet.
newtype YearMonth
YearMonth :: (Integer, Int) -> YearMonth
-- | SrcFile index for a Post for use with IxSet.
newtype SrcFile
SrcFile :: Text -> SrcFile
-- | Take a Value loading function and a filepattern and return an
-- indexable set of Posts.
postIndex :: MonadAction m => (Within Rel (Path Rel File) -> m Value) -> Within Rel [FilePattern] -> m (IxSet '[Tag, Posted, YearMonth, SrcFile] Post)
-- | Create a `Zipper [] Post` from an `IxSet xs Post` by ordering by
-- Posted.
postZipper :: (MonadThrow m, IsIndexOf Posted xs) => IxSet xs Post -> m (Zipper [] Post)
instance Data.Data.Data Shakebook.Conventions.SrcFile
instance GHC.Classes.Ord Shakebook.Conventions.SrcFile
instance GHC.Classes.Eq Shakebook.Conventions.SrcFile
instance GHC.Show.Show Shakebook.Conventions.SrcFile
instance Data.Data.Data Shakebook.Conventions.YearMonth
instance GHC.Classes.Ord Shakebook.Conventions.YearMonth
instance GHC.Classes.Eq Shakebook.Conventions.YearMonth
instance GHC.Show.Show Shakebook.Conventions.YearMonth
instance Data.Data.Data Shakebook.Conventions.Posted
instance GHC.Classes.Ord Shakebook.Conventions.Posted
instance GHC.Classes.Eq Shakebook.Conventions.Posted
instance GHC.Show.Show Shakebook.Conventions.Posted
instance Data.Data.Data Shakebook.Conventions.Tag
instance GHC.Classes.Ord Shakebook.Conventions.Tag
instance GHC.Classes.Eq Shakebook.Conventions.Tag
instance GHC.Show.Show Shakebook.Conventions.Tag
instance Data.Aeson.Types.ToJSON.ToJSON Shakebook.Conventions.Post
instance Data.Data.Data Shakebook.Conventions.Post
instance GHC.Classes.Ord Shakebook.Conventions.Post
instance GHC.Classes.Eq Shakebook.Conventions.Post
instance GHC.Show.Show Shakebook.Conventions.Post
instance GHC.Classes.Ord Data.Aeson.Types.Internal.Value
instance Data.IxSet.Typed.Indexable '[Shakebook.Conventions.Tag, Shakebook.Conventions.Posted, Shakebook.Conventions.YearMonth, Shakebook.Conventions.SrcFile] Shakebook.Conventions.Post
module Shakebook.Feed
-- | Convert a Post to an Atom Entry
asAtomEntry :: Value -> Entry
-- | Build an Atom Feed from a list of posts.
buildFeed :: MonadAction m => Text -> Text -> [Value] -> Path Rel File -> m ()
module Shakebook.Defaults
defaultMonthUrlFormat :: UTCTime -> Text
defaultPrettyMonthFormat :: UTCTime -> Text
defaultPrettyTimeFormat :: UTCTime -> Text
defaultMonthUrlFragment :: UTCTime -> Text
defaultEnrichPost :: Value -> Value
defaultMarkdownReaderOptions :: ReaderOptions
defaultHtml5WriterOptions :: WriterOptions
defaultLatexWriterOptions :: WriterOptions
defaultVideoReplacement :: Text -> Text -> Inline
defaultPagePaths :: MonadThrow m => [Int] -> m [Path Rel File]
module Shakebook.Sitemap
asSitemapUrl :: Text -> Value -> SitemapUrl
buildSitemap :: MonadAction m => Text -> [Value] -> Path Rel File -> m ()
module Shakebook