Front Matter Explained

When using markdown, front matter is simply the stuff that goes at the front of the file. It is like a table of key value pairs that sets values to be used later. So for example a static site generator might read the baseURL from the front matter and use it when creating all links.

An example, in Obsidian I used the Properties and add a "title" property.
Pasted image 20240318144651.png

Then I opened the text file in the file manager (not obsidian).
Pasted image 20240318144912.png

You can see it inserted the title: between the lines with three hyphens. Note that is it at the top aka "front" of the file. Hence "front matter".

This front matter essentially can contain things that are beyond just text so they can be used. It is often variables or settings that can be used for value added functionality. It may be something like a website name or author which can be replaced on all pages or it maybe a setting like "draft: true" to avoid pages when publishing a website from the notes. These are things that are not the content of the note and we probably do not need to display them, they are used by the program and plugins to add value to the note taking and using process.