@moss-tools/md-indexer parses a Markdown (or VitePress) docs directory and syncs it to a Moss index in one call. Use it in CI to keep your search index current whenever docs change.
Installation
^1.0.0 (used to resolve config and parse markdown).
Environment setup
Usage
sync — build and upload in one step
The most common path: parse docs and push to Moss immediately.
buildJsonDocs — build the index without uploading
Useful for inspecting the output or caching it between steps.
createIndex — upload a pre-built index file
VitePress config resolution
The indexer callsvp.resolveConfig() on the path you pass to sync() or buildJsonDocs().
- Config file present — if
.vitepress/config.ts(or.js) exists, the indexer honourssrcDir, markdown options, and all other VitePress settings. - No config file — VitePress zero-config mode: all
.mdfiles in the directory are auto-discovered and processed with default settings. No config file needed for simple doc trees.
Could not resolve VitePress config in <path>.