We switched to a manual approval system for registration on this forum, as this makes it easier to keep bots out of the forum. We'll approve everybody who doesn't look like a bot!

YAML Frontmatter and Pandoc template

edited November 2019 in Zettelkasten

Dear Hendrik,
I understand that YAML has now been integrated into Zettlr, and it is rendered correctly. How does it work within Zettlr, however? In fact, for the bibliography, Zettlr got its own preferences, and as far as I see, I can only use YAML only if I use the terminal/command line and run the relative Pandoc command. Am I right on it?

Also, I have seen that a .docx template for Pandoc has been mentioned as option in one of the Tweets. How can I select such template in Zettlr preferences?

Sorry, possibly I have not read enough the manual...

PS. this post has gone under Zettelkasten, it should be under General. Sorry...

Comments

  • Hey,

    what I've only added is the syntax highlighting, YAML support is still only provided by Pandoc. So what happens is that your files will be passed to pandoc, whose task it then is to parse it correctly. So I'd rather like to direct you towards the Pandoc manual for more information on how YAML frontmatters work! Although, more support for YAML within Zettlr itself will likely follow in the next years.

  • I have been actively using YAML metadata blocks in my Markdown files and have been generating HTML from the command line. I finally took a look at the Pandoc command field in Preferences | Advanced. Changing markdown to markdown+yaml_metadata_block did the trick!!

    Note that your HTML template also needs to have the right metadata variables in it to display the metadata.

  • Changing markdown to markdown+yaml_metadata_block did the trick!!

    Huh, really? For me it works even without specifying the YAML filter o_O

    Note that your HTML template also needs to have the right metadata variables in it to display the metadata.

    Yeah, I just realised a few days ago that the HTML template is not really up-to-date. It's hard to think of everything with such a huge app :D

Sign In or Register to comment.