I’ve just read the guide on meta data, which implies the option to use your own ‘keys’ in the meta data.
The guide gives the following example for meta data:
multiple: [one, two, three]
I’ve copied and pasted that into a note, but it just says “Metadata (invalid YAML)”. It seems like the list is the thing that makes it invalid, removing the list makes the meta data, ehm, not invalid.
But that’s about it. The meta data box just disappears. ‘Tags’ and ‘aliases’ are the only ‘key’ that seem to work. Other ‘supported YAML metadata’, like title or description, also doesn’t seem to work.
So that makes me wonder. Is there a trick that I’m missing to use custom meta data? Did the developers phase out the option to use your own keys, and forgot to update the guide? Did I wrongly interpret the guide? Or was the guide just a bit misleading?
The formatting is fine, it’s just that the key
multiple appears twice.
This is just to show how formatting can be done in YAML.
Valid keys are
cssclass. You can use more than that, e. g. when using a CSS snippet that uses them for special features or a plugin (edit: well, that’s what
cssclass is for), but Obsidian itself currently natively only works with the aforementioned keys.
The docs will be improved in the future, I’ve already put in a PR for that.
Thanks, then I just misinterpreted it. More metadata would be kinda useful though, I’m a little surprised that other common YAML keys aren’t working, but that’s something for the ‘someday’ list I guess.
What other YAML keys would you be looking for?
You can of course use more and process them with plugins/external scripts, however there is a risk that this might collide one day with newly introduced keys for native functionality.
(Although a Regex search and replace should take care of that in case that happens.)
What I was trying to do, is putting a status like ‘concept’, ‘busy’ or ‘done’ on a note to quickly find something I was working on. But it seems like that would require a feature request. I don’t think it’s that important though, tags will suffice, although meta data seems more appropiate for that.
I couldn’t find any plugins specifically for processing other keys, but I suppose the processing is just a function for a specific goal within a plugin.
Yes, tags are what I would have recommended.
Not sure though whether that works with your workflow.
I wanted to use this for “topics”, “author”, “type”, etc. These could be tags such as “type/podcast”, “author/john-smith”, “science”. One disadvantage is that you won’t easily see what fields you need to fill it. Another disadvantage is you can’t use wiki links. For example, I kind of want the topics to be wiki links not tags. Just getting started with Obsidian so not sure this is going to be a big problem for me.
Is there some benefit to it being YAML? I could just put a text block at the top. But it would be nice to be able to format it differently - a gray background or such - and don’t think I can do that.