diff options
| author | William Rusnack <[email protected]> | 2022-12-18 10:26:12 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-18 07:26:12 -0800 |
| commit | 20765f41e2a5054710973f97409ddc0c774a6607 (patch) | |
| tree | 610409f502b84d5c5b061f0f0adafb9ab7b77d82 | |
| parent | e83120fd2da2c8ffbd97ef0228a0a39767bca1aa (diff) | |
Add Wrapper type documentation to Text.Pandoc.Templates (#8490)
Added more information on the wrappers from the commit
https://github.com/renjianxiongqi/pandoc/commit/f36b5b8a5db8479bcf98827c267840304403bdf0
Co-authored-by: William Rusnack <[email protected]>
| -rw-r--r-- | src/Text/Pandoc/Templates.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs index 469401c97..690fde85a 100644 --- a/src/Text/Pandoc/Templates.hs +++ b/src/Text/Pandoc/Templates.hs @@ -12,6 +12,22 @@ Portability : portable Utility functions for working with pandoc templates. + +'WithDefaultPartials' and 'WithPartials' are Monad wrappers. Wrapping +these around an instance of 'PandocMonad' gives different instances of +'TemplateMonad', with different search behaviors when retrieving +partials. + +To compile a template and limit partial search to pandoc’s data files, +use @runWithDefaultPartials (compileTemplate ...)@. + +To compile a template and allow partials to be found locally (either on +the file system or via HTTP, in the event that the main template has an +absolute URL), ue @runWithPartials (compileTemplate ...)@. + +'getTemplate' seeks a template locally, or via HTTP if the template has +an absolute URL, falling back to the data files if not found. + -} module Text.Pandoc.Templates ( Template |
