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

Safe HaskellNone
LanguageHaskell2010

Shakebook.Defaults

Synopsis

Documentation

defaultSbConfig Source #

Arguments

:: Text

BaseURL

-> SbConfig 

affixBlogNavbar Source #

Arguments

:: MonadShakebookAction r m 
=> [FilePattern] 
-> Text 
-> Text 
-> (UTCTime -> Text) 
-> (UTCTime -> Text) 
-> (Value -> Value)

Post enrichment.

-> Value 
-> m Value 

affixRecentPosts Source #

Arguments

:: MonadShakebookAction r m 
=> [FilePattern] 
-> Int 
-> (Value -> Value)

Post enrichment

-> Value 
-> m Value 

defaultPostIndexData Source #

Arguments

:: 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) 

defaultPagerPattern Source #

Arguments

:: 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 -> ShakebookA r (Zipper [] Value)) 
-> (Zipper [] Value -> ShakebookA r (Zipper [] Value)) 
-> m () 

defaultPostIndexPatterns Source #

Arguments

:: MonadShakebookRules r m 
=> [FilePattern] 
-> FilePath 
-> (Zipper [] Value -> ShakebookA r (Zipper [] Value))

Pager extension.

-> m () 

defaultTagIndexPatterns Source #

Arguments

:: MonadShakebookRules r m 
=> [FilePattern] 
-> FilePath 
-> (Zipper [] Value -> ShakebookA r (Zipper [] Value))

Pager extension.

-> m () 

defaultMonthIndexPatterns Source #

Arguments

:: MonadShakebookRules r m 
=> [FilePattern] 
-> FilePath 
-> (Zipper [] Value -> ShakebookA r (Zipper [] Value))

Pager extension.

-> m () 

defaultPostsPatterns Source #

Arguments

:: MonadShakebookRules r m 
=> FilePattern 
-> FilePath 
-> (Value -> ShakebookA r Value)

A post loader function.

-> (Zipper [] Value -> ShakebookA r (Zipper [] Value))

A transformation on the entire post zipper.

-> m () 

Default Posts Pager.

buildPDF :: MonadShakebookAction r m => Cofree [] String -> String -> FilePath -> m () Source #

Build a PDF from a Cofree table of contents.

defaultSinglePagePattern Source #

Arguments

:: MonadShakebookRules r m 
=> FilePath

The output filename e.g "index.html".

-> FilePath

A tmpl file.

-> (Value -> ShakebookA 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.

defaultStaticsPhony :: MonadShakebookRules r m => 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 :: MonadShakebookRules r m => [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.