Render title from YAML front matter in Preview

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".

4 Likes

What about this:

```yaml
yaml matter

And close of with 3 backticks.

Or is this not what you meant?

Hi Klaas, thanks for the reply.

Using 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. :slight_smile:

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. :slight_smile:

Have a nice weekend!

1 Like

Cheers! You too :smile:

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.

4 Likes

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. :slight_smile:

2 Likes