Rules and Providers for working with pandoc.
pandoc
load("@rules_pandoc//pandoc:defs.bzl", "pandoc")
pandoc(name, srcs, data, out, args, embed_resources, metadata, read, standalone, template, title,
write)
This is the main rule to interactive with pandoc.
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| srcs | Source files that are passed as input to
pandoc. |
List of labels | required | |
| data | Additional files to add to the conversion, e.g.: header, footer, css files. | List of labels | optional | [] |
| out | The output file to write | Label | required | |
| args | Additional arguments passed to
pandoc, subject to location expansion |
List of strings | optional | [] |
| embed_resources | Embed external resources (e.g. style
files) into the output document. See the documentation for the --embed-resources
option for details. |
Boolean | optional | False |
| metadata | Metadata to give to the conversion. This
represents the --metadata option of pandoc. |
Dictionary: String -> String | optional | {} |
| read | The format to read the sources as. Run
pandoc --list-input-formats for more information |
String | required | |
| standalone | Convert the input to a standalone
document. See the documentation for the --standalone
option for details. |
Boolean | optional | False |
| template | The template to use to render the output file. | Label | optional | None |
| title | - | String | optional | "" |
| write | The format to write the output as. Run
pandocs --list-output-formats for more information |
String | required |
PandocDocumentInfo
load("@rules_pandoc//pandoc:defs.bzl", "PandocDocumentInfo")
PandocDocumentInfo(template, sources, output, title)
Pandoc document information
FIELDS
| Name | Description |
|---|---|
| template | Path to the used template file, None if the default template is used |
| sources | depset of files that are used as input to
pandoc |
| output | output file |
| title | Document title |