diff options
| author | Albert Krewinkel <[email protected]> | 2024-06-07 18:21:46 +0200 |
|---|---|---|
| committer | Albert Krewinkel <[email protected]> | 2024-06-07 20:36:29 +0200 |
| commit | bfb0475d677bd5e7a61629107d99f2371a75e2d1 (patch) | |
| tree | a480786b8436f58613c218adac3384e78063f561 /doc | |
| parent | 430d525378bc7b318823fb1d5cba09da13ba9453 (diff) | |
doc/lua-filters: autogenerate docs for module pandoc.template
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lua-filters.md | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md index 5ca68bdb5..8ae6e3f8e 100644 --- a/doc/lua-filters.md +++ b/doc/lua-filters.md @@ -6126,10 +6126,14 @@ Returns: <!-- END: AUTOGENERATED CONTENT --> +<!-- BEGIN: AUTOGENERATED CONTENT for module pandoc.template --> + # Module pandoc.template Handle pandoc templates. +## Functions {#pandoc.template-functions} + ### apply {#pandoc.template.apply} `apply (template, context)` @@ -6143,7 +6147,7 @@ aforementioned types, or a nested context. Parameters: `template` -: template to apply ([Template]{#type-template}) +: template to apply ([Template]) `context` : variable values (table) @@ -6152,17 +6156,19 @@ Returns: - rendered template ([Doc]) +*Since: 3.0* + ### compile {#pandoc.template.compile} `compile (template[, templates_path])` -Compiles a template string into a [Template](#type-template) -object usable by pandoc. +Compiles a template string into a [Template] object usable by +pandoc. -If the `templates_path` parameter is specified, should be the -file path associated with the template. It is used when checking -for partials. Partials will be taken only from the default data -files if this parameter is omitted. +If the `templates_path` parameter is specified, then it should be +the file path associated with the template. It is used when +checking for partials. Partials will be taken only from the +default data files if this parameter is omitted. An error is raised if compilation fails. @@ -6178,32 +6184,36 @@ Parameters: Returns: -- compiled template (Template) +- compiled template ([Template]) + +*Since: 2.17* ### default {#pandoc.template.default} `default ([writer])` Returns the default template for a given writer as a string. An -error if no such template can be found. +error is thrown if no such template can be found. Parameters: `writer` -: name of the writer for which the template should be - retrieved; defaults to the global `FORMAT`. +: name of the writer for which the template should be retrieved; + defaults to the global `FORMAT`. (string) Returns: - raw template (string) +*Since: 2.17* + ### meta_to_context {#pandoc.template.meta_to_context} `meta_to_context (meta, blocks_writer, inlines_writer)` -Creates template context from the document's [Meta]{#type-meta} -data, using the given functions to convert [Blocks] and [Inlines] -to [Doc] values. +Creates template context from the document's [Meta] data, using +the given functions to convert [Blocks] and [Inlines] to [Doc] +values. Parameters: @@ -6220,6 +6230,10 @@ Returns: - template context (table) +*Since: 3.0* + +<!-- END: AUTOGENERATED CONTENT --> + <!-- BEGIN: AUTOGENERATED CONTENT for module pandoc.types --> # Module pandoc.types @@ -6468,5 +6482,8 @@ Returns: [null]: #pandoc.json.null [this blog post]: http://neilmitchell.blogspot.co.uk/2015/10/filepaths-are-subtle-symlinks-are-hard.html [ChunkedDoc]: #type-chunkeddoc + [Doc]: #type-doc + [Template]: #type-template + [Meta]: #type-meta [zip.Entry]: #type-pandoc.zip.Entry [zip.Archive]: #type-pandoc.zip.Archive |
