Like Jekyll, Hugo and Obsidian, the spec treats a file as having front matter when
its first line is exactly --- and a later line is also ---. Everything between
them is kept as front matter. (In Obsidian, this block is what shows up as a note’s
Properties.)
That rule misreads one kind of file. Here is an example:
---
# Meeting notes
We agreed on the plan.
---
## Next steps
- Send the draft
The author meant the first --- as a horizontal rule. But because another ---
appears later, everything from line 1 to that second --- — including the
heading “Meeting notes” — is read as front matter and disappears from the tree.
(Files that start with *** or ___ instead are not affected.)
Before we settle the rule, I’d like to know whether files like this exist in
practice.
Do you have any notes whose first line is --- used as a horizontal rule, with
another --- somewhere below? If so, please share what kind of note it is and its
first ten lines (edit out anything private), either here or on the issue:
I expect someone has files like that, but that item is more properly a “thematic break”, so belongs between other items and not at the start of a file.
As a rule (ha!), I start every file with ---. I just like how it looks, and very frequently I have informal frontmatter (I just use a bulleted list) above that line. So I figure it might as well be there.
Then, it’s not uncommon for me to want to separate the file later using another line.
This might not be formally correct by some spec, but Obsidian isn’t a code editor. I make my notes look like how I want them to look.
Thank you — this is exactly the case I was looking for.
One detail decides it: is the --- literally the first line of the file, or does the bulleted “informal frontmatter” come above it? The rule I’m writing only treats the block as front matter when the very first line is ---.
If you can paste the first ten lines of one of those notes (edit out anything private), that settles it.
Thank you — that settles it.
Your file is exactly the shape I was asking about,
and it changed the outcome: instead of keeping the rule as it was, I’ve proposed a guard so that a --- followed by a blank line is read as a horizontal rule, not as front matter.
Your example is quoted in the proposal — it’s RFC 0048 in the spec repo I linked in my first post.