# Render title from YAML front matter in Preview

**URL:** <https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845>\
**Category:** Feature archive\
**Created:** [July 30, 2020, 2:29pm UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845 "2020-07-30T14:29:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![JkNML](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@JkNML](https://forum.obsidian.md/u/JkNML)\
**Post date:** [July 30, 2020, 2:29pm UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/1 "2020-07-30T14:29:39Z")

</div>

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:

 ![2020-07-30_16-27-49](https://forum.obsidian.md/uploads/default/original/2X/c/c88c569d0dddee8cf33b22fd95f055bc8e1cb075.png)

The proper rendering would be `This is my example note`, not `title: "This is my example note"`.

---

<div class="post-metadata">

**Author:** ![Klaas](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Klaas](https://forum.obsidian.md/u/Klaas)\
**Post date:** [July 30, 2020, 4:49pm UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/2 "2020-07-30T16:49:56Z")

</div>

What about this:

````auto
```yaml
yaml matter

````

And close of with 3 backticks.

Or is this not what you meant?

---

<div class="post-metadata">

**Author:** ![JkNML](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@JkNML](https://forum.obsidian.md/u/JkNML)\
**Post date:** [July 31, 2020, 6:53am UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/3 "2020-07-31T06:53:38Z")

</div>

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](https://docs.zettlr.com/en/core/yaml-frontmatter/). So that the `title` variable is used for the H1 heading in the preview window.

Hope I put it better in words now. 🙂

---

<div class="post-metadata">

**Author:** ![Klaas](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Klaas](https://forum.obsidian.md/u/Klaas)\
**Post date:** [July 31, 2020, 7:28am UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/4 "2020-07-31T07:28:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JkNML](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@JkNML](https://forum.obsidian.md/u/JkNML)\
**Post date:** [July 31, 2020, 7:40am UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/5 "2020-07-31T07:40:27Z")

</div>

> [@Klaas](#):
>
> 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!

---

<div class="post-metadata">

**Author:** ![Klaas](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Klaas](https://forum.obsidian.md/u/Klaas)\
**Post date:** [July 31, 2020, 8:18am UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/6 "2020-07-31T08:18:42Z")

</div>

Cheers! You too 😄

---

<div class="post-metadata">

**Author:** ![Dor](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/d/5fc32e/32.png) [@Dor](https://forum.obsidian.md/u/Dor)\
**Post date:** [July 31, 2020, 8:34am UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/7 "2020-07-31T08:34:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![y.pencil](https://forum.obsidian.md/user_avatar/forum.obsidian.md/y.pencil/32/4005_2.png) [@y.pencil](https://forum.obsidian.md/u/y.pencil)\
**Post date:** [August 5, 2020, 1:22pm UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/8 "2020-08-05T13:22:35Z")

</div>

I think the issue is that the second — turns the title: line into H1.

---

<div class="post-metadata">

**Author:** ![c099](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/c/ad7895/32.png) [@c099](https://forum.obsidian.md/u/c099)\
**Post date:** [August 6, 2020, 10:26am UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/9 "2020-08-06T10:26:32Z")

</div>

Foam has added YAML front matter support [https://github.com/foambubble/foam/pull/191](https://github.com/foambubble/foam/pull/191)

I hope Obsidian can support this feature. 🙂

---

<div class="post-metadata">

**Author:** ![slyg](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/41988e/32.png) [@slyg](https://forum.obsidian.md/u/slyg)\
**Post date:** [June 22, 2022, 12:31pm UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/10 "2022-06-22T12:31:58Z")

</div>

Alternatively you can use DataView :

```auto
---
title: My title
---

# `= this.title`

content

```

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [June 18, 2026, 3:37pm UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/11 "2026-06-18T15:37:35Z")

</div>

This FR is old and likely no longer relevant.

Alternatively, it’s duplicate of

> [@Use H1 or YAML property "title" instead of or in addition to filename as display name](https://forum.obsidian.md/t/use-h1-or-yaml-property-title-instead-of-or-in-addition-to-filename-as-display-name/687):
>
> I’m interested in a setting that would use a note’s H1 or front-matter title instead of or in addition to the filename as the display name everywhere: links, backlinks, graph view, search, etc. How would this be useful: For users who use IDs as filenames or who generally want more concise filenames Use illegal filename characters and emojis in note titles More readable graph, search, backlinks, etc. Other assumptions/thoughts/questions: Is this global or feature-specific? By feature-specif…

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [July 16, 2026, 3:37pm UTC](https://forum.obsidian.md/t/render-title-from-yaml-front-matter-in-preview/3845/12 "2026-07-16T15:37:41Z")

</div>

Closed on July 16, 2026, 3:37pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
