Handling of database-like structures + links in frontmatter

tl;dr: Has anyone created database-like structures for content and found a good way to replicate this within Silverbullet?

Hi everyone. I got hyped by the v2 release and I’m adding more stuff to my Silverbullet instance.

There are two points that always stopped me from adding some structured content I have in other tools to Silverbullet, and I wanted to ask if this is totally out of scope or if you have a suggestion on how you would deal with this differently.

For example, I have “table” Software and a “table” OS, and each page almost always has the same properties like URL, Repository, Operating System.

So it could look something like this

├── CleanshotX.md
└── OS
    ├── Android.md
    ├── iOS.md
    ├── Linux.md
    ├── macOS.md
    └── Windows.md

(in reality Cleanshot.md would have an own folder Software)

The CleanshotX.md could look something like this

---
os: [[OS/macOS]]
docs: "https://somewhere.tld"
---

This tool can do this and that

The problems I now have are that

  1. [[OS/macOS]] is not considered a link.
  2. Changing the name of OS/macOS won’t update it on other pages in the frontmatter. I could add it to the body, but then I’d lose query functionality.
  3. When I’m on the page directly, links aren’t rendered without a query.
  4. (That may be too much to ask) Globally renaming properties wouldn’t be possible without parsing the data source manually (example: renaming docs to documentation in CleanshotX.md)

Any idea on how you would something like this?

2 Likes

I remember correctly, @Maarrk did some work on supporting page links in frontmatter recently and it should now work. The trick is that indeed in YAML [[bla bla]] means: “a list of lists with bla bla in them” which is not what you mean, so you have to put quotes around it: os: "[[OS/macOS]]" should work also with page renames.

1 Like

Yup, this was exactly the kind of usage I was hoping to enable :slightly_smiling_face:

Zef’s explanation is already in the docs, just apparently less discoverable. @itsamemarkus do you remember which pages you saw before posting? Do you think a change like this PR would help?