mistyped
mistyped

Reputation: 63

Pandoc fails to embed metadata from the supplied YAML file

I need to convert some .xhtml files to regular .html (html5) with pandoc, and during the conversion I would like to embed some metadata (supplied via a YAML file) in the final files.

The conversion runs smoothly, but any attempt to embed the metadata invariably fails.

I tried many variations of this command, but it should be something like:

pandoc -s -H assets/header -c css/style.css -B assets/prefix -A assets/suffix --metadata-file=metadata.yaml input_file -o output_file --to=html5

The error I get is:

pandoc: unrecognized option `--metadata-file=metadata.yaml' Try pandoc --help for more information.

I really don't get what's wrong with this, since I found this option in the pandoc manual

Any ideas?

Upvotes: 1

Views: 1101

Answers (1)

tarleb
tarleb

Reputation: 22544

Your pandoc version is too old. Update to pandoc 2.3 or later.

Upvotes: 3

Related Questions