# Metadata standard

**URL:** <https://forum.obsidian.md/t/metadata-standard/802>\
**Category:** Feature archive\
**Created:** [May 29, 2020, 11:55pm UTC](https://forum.obsidian.md/t/metadata-standard/802 "2020-05-29T23:55:11Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdillahu](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/71e660/32.png) [@bdillahu](https://forum.obsidian.md/u/bdillahu)\
**Post date:** [May 29, 2020, 11:55pm UTC](https://forum.obsidian.md/t/metadata-standard/802/1 "2020-05-29T23:55:11Z")

</div>

I’ve seen a little discussion, but please excuse me if I missed something…

Is there an accepted “standard” for Note metadata?

Are we putting a YAML block at the top?

Just using tags (that doesn’t really cover it) - I would like the ability to deal with custom metadata.

Obviously I can (and will) include it in my note manually, but didn’t know if there were thoughts in this direction.

Thanks!

---

<div class="post-metadata">

**Author:** ![ksandvik](https://forum.obsidian.md/user_avatar/forum.obsidian.md/ksandvik/32/19_2.png) [@ksandvik](https://forum.obsidian.md/u/ksandvik)\
**Post date:** [May 30, 2020, 12:15am UTC](https://forum.obsidian.md/t/metadata-standard/802/2 "2020-05-30T00:15:30Z")

</div>

YAML is pretty common.

---

<div class="post-metadata">

**Author:** ![sam.baron](https://forum.obsidian.md/user_avatar/forum.obsidian.md/sam.baron/32/20_2.png) [@sam.baron](https://forum.obsidian.md/u/sam.baron)\
**Post date:** [May 30, 2020, 12:44am UTC](https://forum.obsidian.md/t/metadata-standard/802/3 "2020-05-30T00:44:05Z")

</div>

No Obsidian standard yet, but I suspect it will be YAML

---

<div class="post-metadata">

**Author:** ![Silver](https://forum.obsidian.md/user_avatar/forum.obsidian.md/silver/32/5_2.png) [@Silver](https://forum.obsidian.md/u/Silver)\
**Post date:** [May 30, 2020, 4:12am UTC](https://forum.obsidian.md/t/metadata-standard/802/4 "2020-05-30T04:12:50Z")

</div>

As others said, there’s no “standard”, but YAML is the most popular and the most likely, yes.

---

<div class="post-metadata">

**Author:** ![sam.baron](https://forum.obsidian.md/user_avatar/forum.obsidian.md/sam.baron/32/20_2.png) [@sam.baron](https://forum.obsidian.md/u/sam.baron)\
**Post date:** [July 6, 2020, 8:09pm UTC](https://forum.obsidian.md/t/metadata-standard/802/5 "2020-07-06T20:09:48Z")

</div>

A few YAML-related issues:

- There are potential conflicts between the YAML spec and Obsidian. `#` is a reserved character for comments, and `[]` are reserved characters for flow styles. What does that mean for including tags and links?
- There is a bug in edit mode where in YAML front-matter bounded by `---`, tags and links are not clickable - [https://forum.obsidian.md/t/cannot-follow-links-or-tags-in-front-matter-in-edit-view/1144](https://forum.obsidian.md/t/cannot-follow-links-or-tags-in-front-matter-in-edit-view/1144). This may be related to the issue above.
- In preview mode, YAML front matter bounded by `---` without blank lines are rendered as `<h2>`.

So at least out-of-the-box, there are problems with CodeMirror and YAML front-matter in Obsidian. I understand this was not intentional.

Not sure where to go from here on this issue, but I am hoping for some metadata guidance soon, even if there are no related features for awhile.

---

<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 6, 2020, 8:27pm UTC](https://forum.obsidian.md/t/metadata-standard/802/6 "2020-07-06T20:27:43Z")

</div>

I use YAML because it exists and is commonly used. Would be equally happy with alternative.

---

<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 7, 2020, 3:06am UTC](https://forum.obsidian.md/t/metadata-standard/802/7 "2020-07-07T03:06:22Z")

</div>

A couple of points.

1. `---` above and below text/data is not recognised in Obsidian as Yaml; in e.g. Typora it is, I believe it’s normal markdown, if I am not mistaken.

2. I have noticed that a Yaml code block can be created with, on an empty line, 3 backticks and the word `yaml`, then, on the next line(s) text/data, then, on the last line, 3 more backticks.

3. I have have metadata for each note, and have put it as regular text in the note, but cordoned off with a line from the main body of text. Is there a compelling reason to put it in a Yaml block?

---

<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 7, 2020, 8:11am UTC](https://forum.obsidian.md/t/metadata-standard/802/8 "2020-07-07T08:11:50Z")

</div>

> [@Klaas](#):
>
> `---` above and below text/data is not recognised in Obsidian as Yaml; in e.g. Typora it is, I believe it’s normal markdown, if I am not mistaken.

By definition YAML isn’t markdown, but many programs accept it for the utility of the Front Matter conventions. The — fences are a simple visual cue - most people prefer it to counting backticks.

> [@Klaas](#):
>
> I have have metadata for each note, and have put it as regular text in the note, but cordoned off with a line from the main body of text. Is there a compelling reason to put it in a Yaml block?

For some uses I prefer to have Metadata parsed as part of the main text, but usually I want it excluded and not rendered. And it’s nice when it works the same in other programs and the YAML solution is the only way that does that.

There’s huge inconsistency in implementations of comments in markdown. Some work in Obsidian, others don’t, but none are a commonly accepted way of indicating a Metadata block.

And some people prefer to have their YAML block at the end rather than the beginning, but still refer to it as Front Matter.

Personally, I’d most like the developers to **decide soon**. I’d rather implement a method than not, but it’s off-putting to be aware it might have to be changed.

---

<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 7, 2020, 8:32am UTC](https://forum.obsidian.md/t/metadata-standard/802/9 "2020-07-07T08:32:55Z")

</div>

Thanks for that.

> By definition YAML isn’t markdown, but many programs accept it for the utility of the Front Matter conventions.

OK, sorry for that mistake.

> Personally, I’d most like the developers to **decide soon**. I’d rather implement a method than not, but it’s off-putting to be aware it might have to be changed.

True. The thing is the devs are working full speed at many things that need to be “decided soon”, so I guess we’ll just have to wait till they decide it’s time to decide.

---

<div class="post-metadata">

**Author:** ![icouto](https://forum.obsidian.md/user_avatar/forum.obsidian.md/icouto/32/2002_2.png) [@icouto](https://forum.obsidian.md/u/icouto)\
**Post date:** [July 7, 2020, 7:03pm UTC](https://forum.obsidian.md/t/metadata-standard/802/10 "2020-07-07T19:03:23Z")

</div>

MultiMarkdown [officially supports](https://github.com/fletcher/MultiMarkdown/wiki/MultiMarkdown-Syntax-Guide#metadata) YAML frontmatter for metadata. This is also used by several online blogs that take raw markdown submissions for articles. It’s also used by several static site generators - like Hugo and Jekyl. It seems to be the _de facto_ standard if we want to extend markdown documents with metadata.

---

<div class="post-metadata">

**Author:** ![StefanoCecere](https://forum.obsidian.md/user_avatar/forum.obsidian.md/stefanocecere/32/2802_2.png) [@StefanoCecere](https://forum.obsidian.md/u/StefanoCecere)\
**Post date:** [July 26, 2020, 2:24pm UTC](https://forum.obsidian.md/t/metadata-standard/802/11 "2020-07-26T14:24:59Z")

</div>

YAML front matter is very important, used already by all major markdown editors, and is standard in MultiMarkDown. if it gets properly managed by Obsidian, we could in the future write plugins to read/write/manage the metadata and it’ll be awesome!

---

<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:** [September 22, 2020, 2:27pm UTC](https://forum.obsidian.md/t/metadata-standard/802/12 "2020-09-22T14:27:14Z")

</div>

we have YAML now.

---

<div class="post-metadata">

**Author:** ![xurc](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/x/c4cdca/32.png) [@xurc](https://forum.obsidian.md/u/xurc)\
**Post date:** [September 22, 2020, 2:54pm UTC](https://forum.obsidian.md/t/metadata-standard/802/13 "2020-09-22T14:54:51Z")

</div>

Thanks for keeping us up to date, @WhiteNoise ! 🙂

I am kinda confused with how Obsidian handles YAML front-matter though. If I understand correctly, the YAML front-matter is reserved for plugins to read and write metadata after the public API is released. If so, what are the best practices if I want to use YAML to add custom, user-generated metadata? Should I add a second YAML block after the one reserved for plugins?

The concept of YAML is very new to me so thanks in advance for your patience and help!

---

<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:** [September 22, 2020, 3:37pm UTC](https://forum.obsidian.md/t/metadata-standard/802/14 "2020-09-22T15:37:30Z")

</div>

> [@Include / show note links in yaml frontmatter (v0.8.5)](https://forum.obsidian.md/t/include-show-note-links-in-yaml-frontmatter-v0-8-5/4673/8):
>
> The current idea is to use the YAML block for dev\plugins metadata. We are finalizing this decision. Users should not really use the YAML metadata directly. If users want to use a frontmatter, they can do so outside the YAML block, i.e. --- YAML metadata --- your frontmatter --- main text or --- YAML metadata --- # your frontmatter bla bla bla --- main text

> [@Include / show note links in yaml frontmatter (v0.8.5)](https://forum.obsidian.md/t/include-show-note-links-in-yaml-frontmatter-v0-8-5/4673/11):
>
> Just want to let everyone know that YAML frontmatter is typically removed from the source code when rendering, and the variables stored are used as metadata for whichever app is reading it. Right now we aren’t using it to store anything, but in the future, plugins would be able to access a built-in way of making decisions based on the data inside the frontmatter. This may mean showing some UI that contains data, such as tags showing as a tag list on top of the file, or links that render as “re…

---

<div class="post-metadata">

**Author:** ![xurc](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/x/c4cdca/32.png) [@xurc](https://forum.obsidian.md/u/xurc)\
**Post date:** [September 22, 2020, 3:49pm UTC](https://forum.obsidian.md/t/metadata-standard/802/15 "2020-09-22T15:49:58Z")

</div>

Noted, thanks!

---

<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:** [October 13, 2022, 2:33pm UTC](https://forum.obsidian.md/t/metadata-standard/802/16 "2022-10-13T14:33:51Z")

</div>

Archived on October 13, 2022, 2:33pm UTC


