Installation
Put rules_pandoc as a new dependency in your
MODULE.bazel.
bazel_dep(name = "rules_pandoc", version = "0.0.0")
Usage
Load and use the pandoc rule.
load("@rules_pandoc//pandoc:defs.bzl", "pandoc")
pandoc(
name = "html",
srcs = ["README.md"],
out = "index.html",
read = "gfm",
write = "html5",
)
Use Pandoc from the resolved_toolchain.
genrule(
name = "html",
srcs = ["README.md"],
outs = ["index.html"],
cmd = """\
$(PANDOC_BIN) --from gfm \
--to html --out $(OUTS) < $(SRCS)""",
toolchains = ["@rules_pandoc//pandoc:resolved_toolchain"],
)
Acknowledgement
- The Pandoc Logo used on this site was created by Albert Krewinkel (tarleb) and published under CC BY-SA 4.0 license.
- We use the amazing PicoCSS (fuchsia) to style this page.