Allow YAML frontmatter in notes
in progress
Jonathan Clark
We can use YAML frontmatter in notes, but this currently means all those notes have the unhelpful title
---
. Better handling frontmatter would mean that additional fields can be set in notes, which can then be add value for plugins. It would also be relevant for https://noteplan.canny.io/interoperability/p/choose-note-reference-filename-or-first-line as NP could then pick up a
title: ...
line and use that to name the note.Ideally frontmatter would be visually distinguished from the rest of the note, as happens in Typora, Obsidian and other editors. Perhaps to be like the Reference section?
Eduard Metzger
Merged in a post:
Allow theming of frontmatter
Jonathan Clark
We're now increasingly using frontmatter with the advent of fully-supported Templates. It would be great to be able to theme the frontmatter section differently, as it is a very different beast to the rest of a note. Just like the 'references section' is displayed differently. (Though not themable?)
There are already several boolean fields possible in the theme definitions ("isHiddenWithoutCursor" and "isRevealOnCursorRange"). Could there be an "isInFrontmatter" boolean too?
Eduard Metzger
in progress
Beta available: https://noteplan.co/changelog/v3.16.3-frontmatter-editor
Eduard Metzger
Merged in a post:
Toggle Frontmatter
Mike Erickson
I use frontmatter for most of my notes (beyond templates) which have a number of custom "tags".
Would be nice to have ability to toggle the display of frontmatter section
Sample note with many frontmatter tags
c
communicate@mailbox.org
YAML should be added automatically to each note like in Obsidian
Mike Erickson
Looks nice!
Eduard Metzger
Merged in a post:
Folding for frontmatter (YAML)
Chris
Make frontmatter foldable (and perhaps default to folded and, perhaps remember the folded state, not for each individual note but as an editor setting, i.e. when last viewed note had frontmatter folded, keep it so)
t
tf
Yes please!!
Chris
Can this not be done with existing theming tools?
D
Daniel Danilov
This has been up for a long time, so I'm wondering if there is any plans in 2025 for this? Thank you!
Jonathan Clark
For the record, some of this is now done, but the visually distinguishing isn't.
Load More
→