What is the usefulness of frontmatter?

I have seen one post on this forum When/Why use Frontmatter that I thought was the same as my question but the answers didn’t seem to really satisfy the question. That post is autoclosed so there is no way to talk about it further there.

I have a basic understanding of what forntmatter is and how to create it - that is not my question. My question is what having frontmatter enables you to do (other than dataview uses it). What is the benefit of having frontmatter? What are some tangible ways it can be utilized after having created it in notes? What problem/s does it solve? Right now (with my limited knowledge) it just seems like something pretty to look at or something to make me FEEL like I’m doing something important. But that can’t be right. There must be some really great things is enables you to do - right?


See the Dataview and Dataviewjs examples here on forum and Discord. There are complex queries that would be otherwise impossible without having metadata. Specifically, for example, having links stored in fields can be particularly useful as you can generate tables that have a column for that field thus allowing you to get a page preview of the note. Outside the realm of Dataview, you can use native embeddable Obsidian queries to search for frontmatter values (properties) by containing the search within brackets.

Additionally, many other plugins can utilize frontmatter. For example, see Excalibrain and the way it generates something like a local graph view, but does so with intelligent arrangements utilizing either implicit relationships (via link direction) or explicit definitions (via storing links within various default and customizable fields). There are many uses that don’t require much more than a little bit of initial setup. However this process takes some time getting used to and is greatly assisted via the Templater plugin.

So, in a nutshell, the benefits all kind of fit into a category of searching and organizing based on frontmatter?

Another thing (and I suppose this goes more to using frontmatter effectively)… I noticed in a video by Nicole Van Der Hoeven (who seems to really know what she’s doing with Obsidian) is that her frontmatter was defining the content of the page not the file. Its a funny kind of nuance to try to articulate in a forum post but some of the notes she was showing as an example looked like a character for an RPG and the frontmatter wasn’t really defining the note file but the character in the note file. In other words… her frontmatter was giving key / value pairs related to the character the note was about not things like what kind of note it was (if that makes sense).

1 Like

That is an interesting distinction and makes sense in many use cases. I also find that in some scenarios it can be useful to keep source ideas relatively light when it comes to metadata. In the case that you will be using multiple interpretations of the idea to apply as part of a number of multiple other application notes, it can make more sense to create a separate note for each interpretation. This way, each interpretation can link back to the source, and the application notes can link back to the unique relevant interpretation.

If you really wanted to get specific, the application note could have a source and an interpretation field to store the correct link/links. Although this is just a made up example, it is using these kinds of fields that can elevate your view of your vault while allowing you to quickly isolate notes.

For example, the following Dataview query would create a table of notes that have an application field with a value.

TABLE application WHERE application

Good luck! Thanks!

1 Like

Frontmater also has built-in properties cssclasses and aliases. I use cssclasses a lot, it helps me to add different styles to different pages. Aliases are also useful for linking.

There are a lot of plugins, not only dataview, that use frontmatter. For example the banner plugin store the link to the banner image here, etc. I also put the creation date in the frontmatter of every note, because file ingrained creation date often rewrites after syncing.

Basically frontmatter is metadata, i.e. any additional data of the file that you don’t want to put to the actual content. It is not necessary, but can be useful in many situations. When I write a chapter of the story, I put the synopsis and the writing goal to the frontmatter. When I save an article I want to read from the internet, I add chechbox property “read” to the frontmatter, which I mark after actially reading the article. There are endless possibilities.


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