In the typing editor, Obsidian recognises YAML front matter with special formatting.
But in Preview mode, Obsidian simply includes one horizontal line and the
title field of the YAML front matter. But that’s not how you render YAML data to a HTML preview.
Example of the problem:
The proper rendering would be
This is my example note, not
title: "This is my example note".
What about this:
And close of with 3 backticks.
Or is this not what you meant?
Hi Klaas, thanks for the reply.
yaml with the backticks makes a code block for YAML, which is something else.
I would like that Obsidian parses the YAML front matter such as Zettlr does. So that the
title variable is used for the H1 heading in the preview window.
Hope I put it better in words now.
You probably did not phrase it the wrong way, it’s just that I am not an expert, and tried an answer. When one does not know about a subject, it’s better to keep quiet, which is what I should have done. I am sorry to have bothered you.
No of course not! Why shouldn’t you be allowed to join the conversation? I’m not an expert either. It’s only for the better if other people join in, since that can help to make my feature request better.
Have a nice weekend!
Front matter is still on a list of things to be addressed. YAML seems likeliest to me. But I assume Licat is thinking through the issues of which approach will add most to Obsidian. It’s mentioned from time to time most recently in relation to document styles.
I think the issue is that the second — turns the title: line into H1.
Foam has added YAML front matter support https://github.com/foambubble/foam/pull/191
I hope Obsidian can support this feature.
Alternatively you can use DataView :
title: My title
# `= this.title`