Skip to content

Wiki Linking

my-buddy uses [[slug]] syntax in markdown body text to create links between entries across collections. A custom remark plugin handles resolution, rendering, and backlink tracking.

Met with [[sarah-chen]] about the project.

Resolves sarah-chen across all collections by priority order.

Met with [[sarah-chen|Sarah]] about the project.

Renders as “Sarah” but links to the sarah-chen entry.

Check [[contacts/sarah-chen]] for details.

Targets a specific collection instead of auto-resolving.

Check [[contacts/sarah-chen|Sarah's profile]] for details.

When using [[slug]] without a collection prefix, the plugin resolves in this order:

  1. Accounts
  2. Contacts
  3. Projects
  4. Deals
  5. Tasks
  6. KB
  7. Meetings
  8. Journals

The pre-build step (bun build:index) generates two JSON files:

  • src/data/wiki-link-index.json — Maps every slug to its collection and URL
  • src/data/backlink-index.json — Maps every entry to the entries that reference it

The remark plugin (src/plugins/wiki-links/) transforms wiki link syntax during the Astro build:

  • [[slug]]<a class="wiki-link" href="/collection/slug">Display Name</a>
  • Broken links → <span class="wiki-link-broken">slug</span>

Each entry’s detail page shows a “Referenced by” section listing all entries that link to it. This is powered by the backlink index generated at build time.

## Meeting Notes
Discussed [[acme-crm-integration]] timeline with [[sarah-chen]].
She mentioned the [[api-rate-limiting|rate limiting article]] in our KB
might need updating before we proceed.
Action items:
- Update [[kb/api-rate-limiting]] with new limits
- Create task for [[acme-corp]] API review