Directories support absolute paths and workspace-relative paths.
Commands
Markdown Templates: New Template — Creates a new template file in the first configured template directory with a timestamped filename (newTemplate-YYYYMMdd-HHmmss.md) and opens it in a new editor tab.
Markdown Templates: Select Template — Selects a template and inserts its substitutions block into the current markdown file.
Markdown Templates: Insert Template — Renders the selected template with your substitutions and replaces the selected YAML block with the result.
Workflow
Create and Customise a Template
Run Markdown Templates: New Template.
A new file is created with the default template format and opened in a new tab.
Edit the frontmatter (templateName, templateDescription, substitutions) and the markdown body as needed.
Save the file to complete setup.
Use a Template in Your Markdown
Open a markdown file and place your cursor where the substitutions block should be inserted.
Run Markdown Templates: Select Template and choose a template.
The extension inserts a yaml fenced block containing the template's substitutions section.
Edit values in that inserted block as needed.
Select the edited block.
Run Markdown Templates: Insert Template.
The extension renders the selected template body and replaces your current selection.
Template Format
Templates are markdown files with YAML frontmatter.
templateName is used in template selection.
templateDescription is shown as additional quick-pick information.
substitutions is converted to the editable YAML block inserted into your markdown file.
The markdown body below frontmatter is rendered using mustache syntax.