Skip to content

Add vault_graph() via saber::graph_svg()#12

Merged
TroyHernandez merged 2 commits into
mainfrom
add-vault-graph
Apr 22, 2026
Merged

Add vault_graph() via saber::graph_svg()#12
TroyHernandez merged 2 commits into
mainfrom
add-vault-graph

Conversation

@TroyHernandez
Copy link
Copy Markdown
Contributor

Summary

  • New `vault_graph(vault = default_vault())` renders the vault's wikilink graph as static SVG, using `saber::graph_svg()` for layout + rendering
  • Tooltips: title / type | date / tags / lede — lede is the first meaningful body line, skipping nested frontmatter, `key:` lines, list items, and images
  • Broken wikilinks (targets with no matching page) appear as separate nodes
  • Default viewport 1600x1200 for denser vaults

Depends on saber 0.5.0 for `graph_svg()`. saber is already in pensar's Suggests (from #11); this change adds a real function-level call. Merge after saber PR #21.

Bumps 0.3.0 → 0.4.0.

Test plan

  • 123 tinytest results pass locally
  • Smoke tested on Troy's real vault — 132 nodes, 94 edges, SVG in ~/Sync/vault-graph.svg
  • CI (none configured)

Scans every vault page (excluding control files), extracts
[[wikilinks]] as edges, and renders via saber::graph_svg(). Tooltips
carry title from frontmatter, type, date, tags, and a lede extracted
from the first meaningful body line (skipping nested frontmatter,
YAML-like key:value lines, list items, and markdown images).

Broken wikilinks — targets without a matching page — appear as
separate nodes with a "(broken wikilink)" tooltip.

Default viewport 1600x1200 since vaults tend toward many nodes.

Bumps 0.3.0 -> 0.4.0.
@TroyHernandez TroyHernandez merged commit e1bc934 into main Apr 22, 2026
@TroyHernandez TroyHernandez deleted the add-vault-graph branch April 22, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant