-
Notifications
You must be signed in to change notification settings - Fork 0
VS Code Extension
Leafmark for VS Code provides a sidebar for project management and exports. It invokes @skxv/leafmark through npx; the same external tools required by the CLI are still required.
- Detect Leafmark projects and standalone Markdown sources in the workspace.
- Display live word and character counts.
- Show, open, add, rename, remove, and drag-reorder chapters.
- Edit common title, author, table-of-contents, and section-numbering settings.
- Export PDF, DOCX, HTML, or PDF + HTML.
- Export an individual chapter.
- Start or cancel watch mode.
- Select and apply themes.
- Run tool diagnostics.
- Convert a standalone Markdown file into a Leafmark project.
The extension recognizes projects through:
.leafmark/config.jsonleafmark.json_frontmatter.md
It watches Markdown, project config, frontmatter, and bibliography files for changes.
When a configured frontmatter file exists, common settings are updated there. Otherwise settings are written under metadata in .leafmark/config.json. Advanced project features remain editable directly in JSON/YAML.
The extension delegates to the CLI, so output locations, format behavior, themes, HTML rendering, and errors match command-line builds. Workspace trust is required before the extension runs exports, themes, or diagnostics.
If exports fail in the extension:
- Open the same project in a terminal.
- Run
pnpx @skxv/leafmark doctor. - Run the equivalent export command manually.
- Check Troubleshooting.
The extension source and package metadata live in leafmark-vscode/ in the Leafmark repository.
Leafmark documentation · Source repository · npm
Leafmark Wiki
Authoring
Configuration
Building
Help