Skip to content

vault/large-vault-generator

A seeded generator for a large vault fixture: notes spread over folders, with frontmatter, headings, tags, links between notes and a share of unresolved links.

Plugins that index a vault (backlinks, metadata caches, search) are slow or wrong only at a size nobody writes by hand, and every repo that tested at that size used to carry its own throwaway script. The output is a PopulateFilesParams map, so it goes straight into createSetup({ populate }) or TemporaryVault.populate, which write it before the vault opens and let Obsidian index it in one pass.

The same seed and options always give the same map, byte for byte, so a slow or failing run can be repeated exactly. Pure: it writes nothing itself.

Interface Description
GenerateLargeVaultParams Parameters for generateLargeVault.
Function Description
generateLargeVault Generates a large, seeded vault fixture as a populate map. Note n is <rootFolder>/folder-<f>/note-<n>.md, numbered from 0 and zero-padded so the names sort. Every note name is unique across folders, so a link written as the bare name resolves the way a user’s link would. Each note holds YAML frontmatter (aliases, created, tags), a heading, body paragraphs, and a ## Links section with its links and one inline tag.