Hi,
I would like to have a build command where I can run different commands on a markdown file to convert it to html, docx or a pdf.
Here is a short example. Each variant runs correctly, but there is no default variant if I run it without variants?
{
“selector”: “text.html.markdown”,
“working_dir”: “$file_path”,
“variants”:
[
{
“name”: “pandoc => pdf (scrlttr2dh)”,
“cmd”: [“pandoc.exe”, “$file”, “–from”, “markdown”, “–template”, “scrlttr2dh.latex”, “–pdf-engine=lualatex”, “–to”, “pdf”, “-o”, “${file/\.md/\.pdf/}” ],
},
{
“name”: “pandoc => html”,
“cmd”: [“pandoc.exe”, “$file”, “–from”, “markdown”, “–to”, “html”, “-o”, “${file/\.md/\.html/}” ]
}
]
}
Bonus question:
Is there a way to open the created pdf with default pdf reader after creating it within the build system?