md2hd

Guide5 min read

Connect cards

Name connections, control their direction, and keep one fact from drawing twice.

A relationship connects two card IDs. md2hd accepts four forms.

1. A rel: map

Use this when you want the connection stated plainly in frontmatter.

id: acme
rel:
  employs: [jane-doe, sam-webb]
  runs: records-portal

rels: and links: work the same way.

An unreserved key becomes the relationship label:

id: jane-doe
works_at: '[[acme]]'
reports_to: '[[sam-webb]]'

3. A Dataview-style inline field

Write a named connection inside the note:

owns:: [[records-portal]]
Talked to [[jane-doe]] about the portal.

This creates a gray mentions connection. If the same two cards already have a named connection, md2hd drops the bare mention.

Direction

The card containing the relationship is normally the source:

id: acme
rel:
  employs: jane-doe

This reads Acme employs Jane Doe.

Labels ending in _by are passive and reverse automatically:

id: records-portal
rel:
  owned_by: jane-doe

This draws from Jane Doe to Records Portal as owned.

Give each end its own wording

Some relationships use different words from opposite ends. Declare the pair in the map block:

type: map
inverse:
  works_at: employs
  reports_to: manages

The same connection can then read works at from the person and employs from the organization.

Connections with no direction

List relationships that mean the same thing from either card:

type: map
symmetric: [knows, met, partner]

They draw without an arrowhead. Writing the same relationship from both cards also makes it symmetric.

Keep one fact from drawing twice

md2hd normalizes passive labels, applies inverse: pairs, and folds matching word stems such as owns and owned. If two lines still appear between the same cards, either declare the inverse pair or keep only one written form.

Two genuinely different relationships between the same cards remain separate and draw as distinct curves.