Skip to content

Latest commit

 

History

History
71 lines (66 loc) · 8.48 KB

File metadata and controls

71 lines (66 loc) · 8.48 KB
title Guides
weight 20
summary User guides for mdsmith directives, structure enforcement, and migration.

Guides

Guide Description
Installation Every channel that ships the mdsmith binary, the VS Code extension, or the Claude Code plugin — npm, PyPI, Homebrew, asdf, mise, a Flatpak bundle, the GitHub release, the Visual Studio Marketplace plus Open VSX, and the in-repository Claude Code marketplace — and which channel to pick for which workflow.
File Kinds How to declare file kinds, assign files to them, and read the merged rule config that results.
Schemas Declare a document-structure schema inline on a kind or in a proto.md file, validate headings and front matter, and tighten rule config per section.
Use a Markdown convention Select a built-in convention, declare your own inline, layer rules over its preset, keep the flavor in agreement, and split a convention into its own file.
Extract Markdown as data When a Markdown file's payload is prose, put it in the body under H2 sections — not in YAML frontmatter. mdsmith extract projects body structure into a JSON tree the same way it projects frontmatter, so the file stays editable as Markdown.
Choosing Readability, Conciseness, and Token Budget Metrics Trade-offs and threshold guidance for readability, structure, length, and token budgets.
Coexist with Prettier Run mdsmith alongside Prettier by ordering mdsmith fix before prettier --write in the same pre-commit hook.
Coexist with Vale and remark Vale owns brand voice and prose style; remark owns Markdown AST transformations; mdsmith owns formatting, cross-file integrity, and generated sections. They sit side by side in CI without overlap.
Migrate from markdownlint Convert a markdownlint config to .mdsmith.yml with mdsmith init --from-markdownlint, review the conversion notes, move inline disables into overrides, and run both linters in parallel until cutover.
Progressive Disclosure for AI Agents Use <?catalog?> with a per-file summary front matter field to emit a one-line index of a directory, so AI coding agents read a few thousand tokens of metadata up front and only Read the files a task actually touches.

Directives

Guide Description
Build directive How to use the build directive to declare artifact outputs and source inputs, keep generated bodies in sync, and configure user-declared recipes.
Coming from Hugo Key differences between Hugo templates and mdsmith directives for users familiar with Hugo.
Directives Guides to mdsmith's content directives — generating content with <?catalog?> and <?include?>, enforcing structure with schemas, declaring build artifacts, and moving from Hugo templates.
Enforcing Document Structure with Schemas How to use schemas, require, and allow-empty-section to validate headings, front matter, and filenames.
Generating Content with Directives How to use catalog and include directives to generate and embed content in Markdown files.

Editors

Guide Description
Editors Editor integration guides for mdsmith — VS Code, Neovim, and Obsidian — all driven by the same bundled mdsmith lsp server.
mdsmith for Obsidian Install the mdsmith Obsidian plugin and use its inline diagnostics, hover fixes, fix-on-save, and diagnostics panel — one WebAssembly runtime on desktop and mobile.
mdsmith for VS Code Install the mdsmith VS Code extension and use its inline diagnostics, quick fixes, fix-on-save, and cross-file navigation — one bundled binary, no extra setup.
Neovim Integration Wire mdsmith lsp into Neovim's built-in LSP client so diagnostics, code actions, and navigation work inline with no extra plugin.