Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- defaultMonthUrlFormat :: UTCTime -> String
- defaultPrettyMonthFormat :: UTCTime -> String
- defaultPrettyTimeFormat :: UTCTime -> String
- defaultIndexFileFragment :: Path Rel File
- defaultMonthDirFragment :: MonadThrow m => UTCTime -> m (Path Rel Dir)
- defaultMonthUrlFragment :: UTCTime -> Text
- defaultEnrichPost :: Value -> Value
- defaultMarkdownReaderOptions :: ReaderOptions
- defaultHtml5WriterOptions :: WriterOptions
- defaultLatexWriterOptions :: WriterOptions
- defaultSbSrcDir :: Path Rel Dir
- defaultSbOutDir :: Path Rel Dir
- defaultPostsPerPage :: Int
- defaultSbConfig :: Text -> SbConfig
- affixBlogNavbar :: MonadShakebookAction r m => [FilePattern] -> Text -> Text -> (UTCTime -> Text) -> (UTCTime -> Text) -> (Value -> Value) -> Value -> m Value
- affixRecentPosts :: MonadShakebookAction r m => [FilePattern] -> Int -> (Value -> Value) -> Value -> m Value
- defaultDocsPatterns :: MonadShakebookRules r m => Cofree [] FilePath -> FilePath -> (Value -> Value) -> m ()
- defaultPostIndexData :: MonadShakebookAction r m => [FilePattern] -> (a -> Value -> Bool) -> (a -> Text) -> (a -> Text -> Text) -> a -> m (Zipper [] Value)
- defaultPagerPattern :: MonadShakebookRules r m => FilePattern -> FilePath -> (FilePattern -> Int) -> (FilePattern -> a) -> (a -> RAction r (Zipper [] Value)) -> (Zipper [] Value -> RAction r (Zipper [] Value)) -> m ()
- defaultPostIndexPatterns :: MonadShakebookRules r m => [FilePattern] -> FilePath -> (Zipper [] Value -> RAction r (Zipper [] Value)) -> m ()
- defaultTagIndexPatterns :: MonadShakebookRules r m => [FilePattern] -> FilePath -> (Zipper [] Value -> RAction r (Zipper [] Value)) -> m ()
- defaultMonthIndexPatterns :: MonadShakebookRules r m => [FilePattern] -> FilePath -> (Zipper [] Value -> RAction r (Zipper [] Value)) -> m ()
- defaultPostsPatterns :: MonadShakebookRules r m => FilePattern -> FilePath -> (Value -> RAction r Value) -> (Zipper [] Value -> RAction r (Zipper [] Value)) -> m ()
- makePDFLaTeX :: Pandoc -> PandocIO (Either ByteString ByteString)
- handleImages :: Text -> (Text -> Text) -> Inline -> Inline
- handleHeaders :: Int -> Block -> Block
- pushHeaders :: Int -> Cofree [] Pandoc -> Cofree [] Pandoc
- buildPDF :: (MonadShakebookAction r m, MonadFail m) => Cofree [] String -> Path Rel File -> FilePath -> m ()
- defaultSinglePagePattern :: (MonadRules m, MonadReader r m, HasSbConfig r, HasLocalOut r) => FilePath -> FilePath -> (Value -> RAction r Value) -> m ()
- defaultStaticsPatterns :: MonadShakebookRules r m => [FilePattern] -> m ()
- defaultCleanPhony :: MonadShakebookRules r m => m ()
- defaultSinglePagePhony :: MonadShakebookRules r m => String -> FilePath -> m ()
- defaultStaticsPhony :: MonadShakebookRules r m => [FilePattern] -> m ()
- defaultPostsPhony :: MonadShakebookRules r m => [FilePattern] -> m ()
- defaultPostIndexPhony :: MonadShakebookRules r m => [FilePattern] -> m ()
- defaultTagIndexPhony :: MonadShakebookRules r m => [FilePattern] -> m ()
- defaultPagePaths :: MonadThrow m => Path Rel Dir -> Zipper [] [a] -> m [Path Rel File]
- fileIndexHTML :: Path Rel File
- dirPosts :: Path Rel Dir
- dirMonths :: Path Rel Dir
- dirPages :: Path Rel Dir
- dirTags :: Path Rel Dir
- defaultMonthIndexPhony :: (MonadRules m, MonadReader r m, HasSbConfig r, HasLocalOut r) => [FilePattern] -> m ()
- defaultDocsPhony :: MonadShakebookRules r m => Cofree [] String -> m ()
Documentation
defaultMonthDirFragment :: MonadThrow m => UTCTime -> m (Path Rel Dir) Source #
defaultEnrichPost :: Value -> Value Source #
:: MonadShakebookAction r m | |
=> [FilePattern] | |
-> Int | |
-> (Value -> Value) | Post enrichment |
-> Value | |
-> m Value |
defaultDocsPatterns :: MonadShakebookRules r m => Cofree [] FilePath -> FilePath -> (Value -> Value) -> m () Source #
:: MonadShakebookAction r m | |
=> [FilePattern] | |
-> (a -> Value -> Bool) | A filtering function |
-> (a -> Text) | How to turn the id into a Title. |
-> (a -> Text -> Text) | How to turn the id and a page number (as Text) into a URL link. |
-> a | The id itself. |
-> m (Zipper [] Value) |
:: MonadShakebookRules r m | |
=> FilePattern | |
-> FilePath | |
-> (FilePattern -> Int) | How to extract a page number from the Filepattern. |
-> (FilePattern -> a) | How to extract an id from the FilePattern |
-> (a -> RAction r (Zipper [] Value)) | |
-> (Zipper [] Value -> RAction r (Zipper [] Value)) | |
-> m () |
defaultPostIndexPatterns Source #
:: MonadShakebookRules r m | |
=> [FilePattern] | |
-> FilePath | |
-> (Zipper [] Value -> RAction r (Zipper [] Value)) | Pager extension. |
-> m () |
defaultTagIndexPatterns Source #
:: MonadShakebookRules r m | |
=> [FilePattern] | |
-> FilePath | |
-> (Zipper [] Value -> RAction r (Zipper [] Value)) | Pager extension. |
-> m () |
defaultMonthIndexPatterns Source #
:: MonadShakebookRules r m | |
=> [FilePattern] | |
-> FilePath | |
-> (Zipper [] Value -> RAction r (Zipper [] Value)) | Pager extension. |
-> m () |
:: MonadShakebookRules r m | |
=> FilePattern | |
-> FilePath | |
-> (Value -> RAction r Value) | A post loader function. |
-> (Zipper [] Value -> RAction r (Zipper [] Value)) | A transformation on the entire post zipper. |
-> m () |
Default Posts Pager.
makePDFLaTeX :: Pandoc -> PandocIO (Either ByteString ByteString) Source #
buildPDF :: (MonadShakebookAction r m, MonadFail m) => Cofree [] String -> Path Rel File -> FilePath -> m () Source #
Build a PDF from a Cofree table of contents.
defaultSinglePagePattern Source #
:: (MonadRules m, MonadReader r m, HasSbConfig r, HasLocalOut r) | |
=> FilePath | The output filename e.g "index.html". |
-> FilePath | A tmpl file. |
-> (Value -> RAction r Value) | Last minute enrichment. |
-> m () |
Default Single Page Pattern, see tests for usage. It's possible this could just be called singlePagePattern, as there's no hardcoded strings here, but it would need to run entirely within the monad to translate filepaths.
defaultStaticsPatterns :: MonadShakebookRules r m => [FilePattern] -> m () Source #
Default statics patterns. Takes a list of filepatterns and adds a rule that copies everything verbatim
defaultCleanPhony :: MonadShakebookRules r m => m () Source #
Default "shake clean" phony, cleans your output directory.
defaultSinglePagePhony :: MonadShakebookRules r m => String -> FilePath -> m () Source #
defaultStaticsPhony :: MonadShakebookRules r m => [FilePattern] -> m () Source #
Default "shake statics" phony rule. automatically runs need on "<out>/thing/*" for every thing found in "images/", "css/", "js/" and "webfonts/"
defaultPostsPhony :: MonadShakebookRules r m => [FilePattern] -> m () Source #
Default "shake posts" phony rule. takes a [FilePattern] pointing to the posts and and calls need on "<out>/posts/<filename>.html" for each markdown post found.
defaultPostIndexPhony :: MonadShakebookRules r m => [FilePattern] -> m () Source #
Default "shake posts-index" phony rule. Takes a [FilePattern] of posts to discover and calls need on "<out>/posts/index.html" and "<out>/posts/pages/<n>/index.html" for each page required.
defaultTagIndexPhony :: MonadShakebookRules r m => [FilePattern] -> m () Source #
Default "shake tag-index" phony rule. Takes a [FilePattern] of posts to discover and calls need on "<out>/posts/tags/<tag>/index.html" and "<out>/posts/tags/<tag>/pages/<n>/index.html" for each tag discovered and for each page required per tag filter.
defaultMonthIndexPhony :: (MonadRules m, MonadReader r m, HasSbConfig r, HasLocalOut r) => [FilePattern] -> m () Source #
Default "shake month-index" phony rule. Takes a [FilePattern] of posts to discover and calls need on "<out>/posts/months/<yyyy-md>/index.html" and "<out>/posts/months/<yyyy-md>/pages/<n>/index.html" for each month discovered that contains a post and for each page required per month filter.
defaultDocsPhony :: MonadShakebookRules r m => Cofree [] String -> m () Source #
Default "shake docs" phony rule, takes a Cofree [] String as a table of contents.