Aki353 downloadsYAML bidirectional relation — automatically sync backlinks in frontmatter fields.
An Obsidian plugin that automatically syncs bidirectional relations in YAML frontmatter.
When you add a wikilink to a field in one file, the plugin writes a backlink in the target file's corresponding field — and removes it when you delete the link.
Person.md Mail.md
───────── ─────────
tags: [Person] tags: [Mail]
Mail: [[hello@example]] → Person: [[Alice]] ← auto-generated
Mail ↔ Person, Artist ↔ Songs)title field as display text in backlinksNodian can connect different Bases through typed YAML relations.
For example, you can have one Base filtered by #Person and another Base filtered by #Mail. When a Person note links to a Mail note through the Mail field, Nodian automatically writes the reverse Person field in the Mail note.
Because every relation pair requires tags on both sides, the same field name can safely be used in different Bases without triggering the wrong relation.
AkiSantin/NodianCopy main.js, manifest.json, and styles.css to:
<vault>/.obsidian/plugins/nodian/
Restart Obsidian → Settings → Community Plugins → Enable Nodian.
Open any .md file and add a wikilink to a YAML field:
---
tags: [Person]
Mail: "[[hello@example]]"
---
Right-click the property name → select Configure bidirectional relation.
In the modal, set the counterpart field (e.g. Person) and tags, then press Save.
Open [email protected] — you should see:
---
tags: [Mail]
Person: "[[Alice]]"
---
That's it. From now on, any file's Mail field will automatically sync with the target file's Person field.
If your vault already has existing relations, run a one-time full sync:
Command Palette (Cmd/Ctrl+P) → Sync all bidirectional relations
This scans every file and backfills any missing backlinks.
Add a wikilink to any paired field. The backlink appears in the target file automatically.
# You type this in Artist.md:
Songs: "[[Blue Sky]]"
# Plugin auto-generates this in Blue Sky.md:
Artist: "[[Artist Name]]"
Delete the wikilink from the field. The backlink in the target file is removed automatically.
A field can hold multiple wikilinks:
Songs:
- "[[Blue Sky]]"
- "[[Red Moon]]"
- "[[Green Field]]"
Each target file gets its own backlink. Removing one link only affects that specific target.
A field can be paired with itself:
Related ↔ Related
Adding Related: [[B]] in A.md will add Related: [[A]] in B.md.
By default, backlinks use the plain filename: [[my-artist-id]].
To use the title field as display text, enable Use title as display name in Settings. Backlinks will appear as [[my-artist-id|Some Artist Name]] (using the value of the source file's title frontmatter field). Only the title field is used — aliases are not checked.
Toggling this setting does not retroactively update existing backlinks. After changing it, run Sync all bidirectional relations from the Command Palette to update all backlinks across the vault.
If you link to a file that doesn't exist yet:
Mail: "[[new-contact]]"
When new-contact.md is created (e.g. by clicking the link in Obsidian), the plugin will:
Every relation pair has two tags — Tag A and Tag B — that correspond to Field A and Field B. Tags are required, not optional.
The plugin only syncs when both conditions are met:
This prevents wrong-target sync. For example, if both Release files and Song files have an Artist field, the tag ensures each pair only fires for the correct file type — a Release-tagged file uses the Artist ↔ Release pair, while a Song-tagged file uses the Artist ↔ Song pair.
Go to Settings → Nodian.
Add, edit, or remove field pairs. Each pair defines two field names and two tags that are bidirectionally linked.
| Setting | Default | Description |
|---|---|---|
| Auto sync | ON | Sync backlinks automatically when editing |
| Use title as display name | OFF | Use the title field as display text in backlinks. Run Full Sync after changing. |
| Debug mode | OFF | Log detailed info to the developer console (Cmd/Ctrl+Option+I, filter by [YBR]) |
Each pair also has Tag A and Tag B configured alongside the fields in Settings. The tables below show the field pairings only — tags are assigned through the settings or context menu when you create each pair.
A music vault:
| Field A | ↔ | Field B |
|---|---|---|
| Artist | ↔ | Release |
| Artist | ↔ | Tracks |
| Composer | ↔ | Works |
| Label | ↔ | Releases |
| Related | ↔ | Related |
A company/CRM vault:
| Field A | ↔ | Field B |
|---|---|---|
| ↔ | Person | |
| ↔ | Domain | |
| ↔ | Account | |
| Service | ↔ | Account |
A ↔ B and B ↔ A) are redundant — one pair covers both directions.title, aliases, tags, cssclasses, publish, etc.) cannot be used as relation fields.MIT