We have no plans to implement Notion/Airtable-like database functionalities, but that in theory doesn’t prevent plugin authors from turning Markdown tables into databases […] This is the trade-off we made for Obsidian, which is why I said I don’t think this would be changed at all. It’s in Obsidian’s DNA. Of course, it’s entirely up to you whether you want to make that trade-off, and we respect that. If you value functionality more than future-proofness, something like Notion or Fibery might work better.
I wanted to use front matter for metadata, but found you could not include links to other notes in the YAML. I was okay with that as long as I could create a link within my document using the front matter data value; however, I had difficulty finding a way to create a dynamic link to another note.
I finally found out how to construct this type of link and hope this will help others.
Here’s a simple example for a D&D character. The character race is indicated as “Human” in the front matter, and I want to create a link to the “Human.md” note.
This will create the text “Character Race: Human” where the word “Human” is a link to the file “Human.md” as you see below.
Apologies for embedding images, but I don’t know how to post text without having it reformatted and some of the details lost. Make sure to include a “`” at the beginning and end of the expression. This is the non-shifted version of the “~” key.
Dataview is the only community plugin I have enabled. I don’t believe it is required for this to work, but if you have any issues you might consider enabling Dataview.
This allows me to accomplish what I wanted to do and still use front matter instead of inline metadata link assignment (E.g. “race:: [[Human]]”) somewhere else in the document. This might seem obvious to many of you, but I hope it will help others like me that are new to this.
If anyone knows a simpler or better approach, please let me know.
Unfortunately, this construction works as intended only if you use one-word values. With value like “High Elf” it will work only if you replace the space with “%20”, but now there is a stylistic problem — your link looks like “High%20Elf”. Of course, you can create a second field for a “clean” title, but that’s bodging on top of bodging. Still, for simple tasks it is a good solution.
The line =[[Dataview]].frontmatter1 determines how the data will be shown in reading mode.
In the note “Dataview” I have defined how I want the data to appear in all my other notes. This way I only have to change 1 file to change appearance in all my notes.
This is super useful. I didn’t realize you could create template fields in another page, then use an inline field to evaluate them in the context of the current page! This means we can create some kinds of Dataview templates without needing to use dv.execute(await dv.io.load(...)).
An awesome tool for the toolbelt. Thanks for sharing!
When I add a date the YAML frontmatter in a note, I want the daily note (titled with that date) to display this note as an Unlinked Mention.
This improves my ability to explore my vault by simply browsing my daily notes, and seeing other notes made on those days through the Unlinked Mentions panel.
Proposed solution
Make unlinked mentions work the same as regular full-text searches, including YAML frontmatter.
(Maybe it doesn’t work this way for a reason. Feel free to let me know)
Current workaround (optional)
Perform full-text searches for dates to explore notes made on that day
Hi there,
I have been looking for a solution to this problem for a while, and invested the last 2 days to read through all related work I could find. I tested what I could come up with, and composed everything (Including the very neat solutions by @JayKim and @LilaRest) into one post:
I think we might have a workable solution in reach. @WhiteNoise stated many times that YAML is not to be touched, and with one or two tweaks maybe we don’t have to:
With @JayKim 's solution we have something like:
%%
created:: 2023-01-26
name:: [[Peter Parker]]
parents:: [[Parent1]], [[Parent2]]
%%
`=this.name` is a ...
Where now every information can be stored in one place, used throughout the page and be picked up by dataview, obsidian and humans alike.
Sorry, would you mind sharing some details about what you mean that about “YAML is not to be touched”? Does that mean we should eschew using YAML front-matter for adding our own metadata?
I also remember reading that DataView 2.0 (i.e., “Datacore”) is moving away from inline metadata) …
We can use YAML for the purpose YAML was intended for, but can’t stach all other features we want into the same field. So we have two blocks:
YAML
%%
Fancy feature space
%%
Merging those two has +5 to convenience, but -10 to consistency.
At least that’s how I interpreted it, and with building like that the past few days, it worked well enough for me. I barely use YAML nowadays, since most what I wanted to do was part of fancy feature space, for which I “abused” YAML.
So we have " the purpose YAML was intended for", which is " per file settings/data of plugins ".
Does that mean that we should not use YAML for any metadata that is not related to plugins? Would data specifying pandoc compile systems or lists of directories with resources outside the vault be abusive? Because it’s not “content” either. Either way, I’ve started a thread on this to get more information: Mar 2023: Current "Vision" For Userspace Metadata: YAML? Frontmatter? Dataview Inline?
Thanks @BorgNetzWerk to bring this topic under attention again. Would be great if it will be reworked in the (near) future.
Keeping the standard syntax for frontmatter is important to keep the files compatible with other editors.
How I could see it work is having an alternative frontmatter allowed in obsidian (obsidian specific) that handles wikilinks and tags the same way as in the rest of the note. In addition to this there should be an option/toggle in the editor to convert from standard frontmatter to the obsidian specific version. I think to make that possible there should be some conventions/rules added to that new frontmatter to make it possible to switch between those two. It also would be great to be able to fold/unfold it like the feature that @LilaRest made.
That is just how I see it work, but probably there are other ways to accomplish this.
This could be great news! I’m back after a very long hiatus hoping that Obsidian would evolve into something capable of using atomic notes for everything with links as first class citizens, and it’s almost there!
There are a ton of new plugins providing more Notion-like features which is extremely exciting. Especially since Notion becomes more and more buggy and still has no offline mode! I’m also an advocate for the ownership of personal data and have been working on a web3 startup to make self-custody of tokens and data easy for the everyone, unlocking a new paradigm where apps connect to you and not the other way around.
I’d like to plea once again for links to have first class citizen support within Obsidian and support for them in front matter. Some plugins support the key:: value format, but it looks like many still only support front matter (forgive me if I am mistaken here), causing incompatibility and a bifurcation of standards. In my opinion, this was simply a side effect of the community being forced to find a work-around for their YAML needs. For example, it may have been more appropriate to define in YAML itself which of the YAML keys should be show in read view instead of the key:: value work-around.
There seems to be quite a lot of demand for my original proposal. I’d love to jump on a call with you @WhiteNoise and discuss the possibilities of simple and compatible solutions. There are lots of great solutions proposed within this thread and I’m hopeful a simple and elegant solution will be implemented.