__smm_static_temp_content__
CLI Reference
Main command
serve-my-md: build a static docs website from markdown files.
Options
-d, --directory <path>: docs root path (default .).
-i, --interactive: prompt for docs root.
Build output (SSG)
The CLI generates a fully static site:
- Each route gets its own
.html file with pre-rendered markdown content in the HTML
- Assets (CSS, JS) are built via Vite and placed under
dist/assets/
- The final
dist/ directory is copied to your docs root — ready to deploy
Config and ignore loading
- Loads config from
./smm.config.json relative to target directory.
- Loads ignore rules from
./.smmignore relative to target directory.
- If
publicPath is set in config, copies that directory into app public assets before build.
Markdown pipeline
- Uses markdown-it with task lists and footnotes plugins enabled.
- Prism.js syntax highlighting with auto-loading for unknown languages.
- Generates OG/meta/font tags in HTML from config values.
Runtime/navigation behaviors
- Markdown links with non-HTTP hrefs are intercepted and navigated client-side.
- Intent-based link preloading for faster navigation.
- Keyboard shortcuts:
- Search:
Ctrl+Shift+F
- Next page:
Alt+Enter
- Previous page:
Alt+Shift+Enter
- Search returns matches in current page and across other pages.
Test-only option
--skip-build exists only in vitest mode, not in normal CLI usage.
Future goals
- Search Indexing — structured search index for smarter results
- Config validation — Zod-based schema validation of
smm.config.json with JSON Schema export
- Sitemap — automatic
sitemap.xml generation
- Per-page Open Graph — page-level og tags from frontmatter
- Doctor command — health checks: config validation, route discovery, broken link detection, and more
- Link validation — flag invalid internal links at build-time
- Optional RSS — config-enableable RSS feed for blog/changelog content
- SchemaStore upload — publish JSON Schema to SchemaStore once stable