Copyright | (c) Adam Conner-Sax 2019 |
---|---|
License | BSD-3-Clause |
Maintainer | [email protected] |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Knit.Report.Output.Html
Description
Functions to produce Html output for a Pandoc report.
Synopsis
- htmlWriterOptions :: WriterOptions
- toBlazeDocument :: PandocEffects effs => PandocWriterConfig -> PandocWithRequirements -> Sem effs Html
- pandocWriterToBlazeDocument :: PandocEffects effs => PandocWriterConfig -> Sem (ToPandoc ': effs) () -> Sem effs Html
- mindocOptionsF :: WriterOptions -> WriterOptions
- markDownTextToBlazeFragment :: PandocEffects effs => Text -> Sem effs Html
- writeAllPandocResultsWithInfoAsHtml :: Text -> [DocWithInfo PandocInfo Text] -> IO ()
- writePandocResultWithInfoAsHtml :: Text -> DocWithInfo PandocInfo Text -> IO ()
Default Options
htmlWriterOptions :: WriterOptions Source #
Base Html writer options, with support for MathJax
Formatted output
Arguments
:: PandocEffects effs | |
=> PandocWriterConfig | |
-> PandocWithRequirements | Document and union of input requirements |
-> Sem effs Html |
pandocWriterToBlazeDocument Source #
Arguments
:: PandocEffects effs | |
=> PandocWriterConfig | Configuration info for the Pandoc writer |
-> Sem (ToPandoc ': effs) () | Effects stack to run to get Pandoc |
-> Sem effs Html | Blaze Html (in remaining effects) |
Convert given Pandoc to Blaze Html.
Convert current Pandoc document (from the ToPandoc effect) into a Blaze Html document. Incudes support for template and template variables and changes to the default writer options.
Options helper
mindocOptionsF :: WriterOptions -> WriterOptions Source #
options for the mindoc template
Other helpers
markDownTextToBlazeFragment Source #
Arguments
:: PandocEffects effs | |
=> Text | markDown Text |
-> Sem effs Html |
Convert markDown to Blaze
File writing helpers
writeAllPandocResultsWithInfoAsHtml :: Text -> [DocWithInfo PandocInfo Text] -> IO () Source #
Write each lazy text from a list of DocWithInfo
to disk. File names come from the PandocInfo
Directory is a function arguments.
File extension is "html"
writePandocResultWithInfoAsHtml :: Text -> DocWithInfo PandocInfo Text -> IO () Source #
Write the Lazy Text in a DocWithInfo
to disk,
Name comes from the PandocInfo
Directory is an argument to the function
File extension is "html"
Create the parent directory or directories, if necessary.