I am using pandoc to convert a markdown file to standalone html file. I have css file that I include with the -c
command-line option. I would like to do the same thing with a javascript file, but I have not found an option to include script files similar to the -c
option.
Is there such an option? If not, what is the most efficient way to do the inclusion?
I am using pandoc to convert a markdown file to standalone html file. I have css file that I include with the -c
command-line option. I would like to do the same thing with a javascript file, but I have not found an option to include script files similar to the -c
option.
Is there such an option? If not, what is the most efficient way to do the inclusion?
Share Improve this question asked Feb 21, 2017 at 10:19 equaegheequaeghe 1,78420 silver badges39 bronze badges2 Answers
Reset to default 15Use the header-includes
variable in the YAML metadata header (and run pandoc -s
):
---
header-includes: <script src="foo"></script>
---
my markdown document
More convenient could be to use the flag
`-H FILE, --include-in-header=FILE|URL`
as described here in the pandoc
call. It implies --standalone
.