Frontmatter is used as meta data for the markdown file. So it might not always be appropriate in the final document.
Some other markdown parsers (that for instance generate a flat website) would also not do it, but details there could influence the page behavior.
I see two options.
A parameter to include/exclude the frontmatter in the PDF (possible a quickfix?)
A meta keyword in the frontmatter that allows you to configure this for every page. (a bit like how CSS media queries work). I guess there is some kind of standard for this out there. Let me know if you need info on this.
Frontmatter is used as meta data for the markdown file. So it might not always be appropriate in the final document. Some other markdown parsers (that for instance generate a flat website) would also not do it, but details there could influence the page behavior.
I see two options.