blob: bc63bac22cb53d650533cdbdda358aee78016a99 [file] [log] [blame]
Adrian Brandemuehl72288542018-08-15 20:23:27 -07001"""Converts a markdown file to an html file.
2
3Given the src "xyz.md", produces "xyz.html".
4
5Attrs:
6 src: Markdown file to convert. Only one file can be specified.
7"""
8
9def pandoc_html(name, src):
10 output = name + ".html"
11 native.genrule(
12 name = name,
13 srcs = [src],
14 outs = [output],
15 cmd = "$(location @pandoc//:pandoc_wrapper) -s $< -o $@",
16 tools = ["@pandoc//:all_files", "@pandoc//:pandoc_wrapper"],
17 executable = True,
18 )