Links in YAML header do not automatically update?

When renaming a note [[name]] -> [[new_name]], internal links to the note usually update automatically.
This does not seem to hold if the link is in the YAML header, i.e.

---
up: [[name]]
---

does not automatically update when I rename the note in my Vault.
Am I missing some configuration or misusing YAML?


Obsidian 1.0.0
Windows 10

Things I have tried

What I’m trying to do

I think you are misusing YAML here.

In your example, you wouldn’t actually create a wiki link, but a list, that has another list as it’s only element, and that sublist contains the string “name”.

If you want to have links in frontmatter, you could probably try using obsidian URIs, but I doubt that they would get updated automatically either. Maybe there’s some crazy way to do it with templater or other plugins though?

Thanks @fynn ,
But this breaks the breadcrumbs every time a file is renamed…
What is the recommended way to add breadcrumb links then?

This was only an idea as to how to put links to notes in frontmatter, because wrapping in two brackets doesn’t do that in YAML.

I honestly don’t think there is a recommended way to do it =(

What you could realistically do, is look for a plugin that provides breadcrumb links.

What you could theoretically do is write a plugin, that hooks into the note renaming process, goes through your vault and checks whether the renamed note is referenced in any frontmatter entries and renames them.

I’m also just a user, and not really familiar with the code base, so I don’t know how hard that would be, but I don’t think it’s a realistic solution for you (or me for that matter)

Anyway, good luck looking for a solution!

Inline dataview links are automatically updated and breadcrumbs seems to work with them identically.

But this leaves me wondering why leave the option to create breadcrumbs in the YAML header in the first place… just a pitfall for newcomers that later have to rename everything manually? Still have a feeling I’m missing something

Additional info:

2 Likes

Here’s a plugin that does it

Afaik, the breadcrumbs plugin does not help in updating links in the YAML header.

Following the links above by @ariehen it seems that I didn’t miss anything, it simply doesn’t work…

If this is true, then I think that breadcrumbs should consider disabling linking through the YAML frontmatter.

For valid links in frontmatter you need to use this syntax:

---
up: "[[name]]"
---

But the issue remains: links in frontmatter don’t update, don’t count as backlinks/outlinks, don’t show in graph, … They’re only raw metadata.

2 Likes

Thanks,
And now to manually fix this throughout the vault… :man_facepalming:

My post isn’t the “solution”! I just point to the right syntax, not to a way to solve the auto-update. If there’s any plugin that do that… well, that I don’t know (I know that breadcrumbs use dataview plugin, but I don’t know how it works…)

1 Like

I just needed to be sure how things work… so, solved it in this sense :slight_smile:
Again, this is very confusing for newcomers.

Took me a while to understand why my breadcrumb keep breaking and now I have to manually move the links to inline links.

Decided to use a closing section in each note to add this (breadcrumb info) and links for cross context connections… would be real happy know what other users of breadcrumbs do.

1 Like

You can use a foldable callout or, for example this method:

%% 
my metadata
field1:: value
field2:: [[file1]]
%%
2 Likes

Interesting, two things I totally missed about comments:

  • dataview picks up data from comments
  • and links are auto updated in comments.

This will definitely be useful, thanks.

Didn’t intend to be short just posting links, but I don’t use links in YAML for above reasons. My main template is YAML with a few links that are adjusted/removed as needed.

---
yaml stuff
---

home | inbox | xyz

It mostly works. :wink:

1 Like

It might be worth filing an issue on the Breadcrumbs plugin’s GitHub if none exists yet.