MD Converter supports YAML front matter for document metadata and conversion control.
YAML front matter must appear at the very beginning of the markdown file, enclosed in --- delimiters:
---
format: docx
title: "My Document"
author: "John Smith"
---
# Document Content Starts HerePurpose: Specifies which output format(s) to generate.
Valid Values:
docx- Word document onlypptx- PowerPoint presentation onlyxlsx- Excel spreadsheet onlydocx,pptx- Both Word and PowerPointdocx,xlsx- Both Word and Excelall- Generate all three formats
Example:
format: docxPurpose: Document title. Maps to document properties in output files.
Requirements:
- Must be a non-empty string
- Used as filename if not specified in CLI
Example:
title: "Executive Brief - AI Capability Enablement"Purpose: Document author name. Maps to creator/author property.
Example:
author: "Dale Rogers"Default: "MD Converter" if not specified
Purpose: Document date or last modified date.
Format: YYYY-MM-DD (recommended)
Example:
date: "2025-11-10"Warning: Non-YYYY-MM-DD format will generate a warning
Purpose: Document classification or security level.
Example:
classification: "OFFICIAL"Common Values: OFFICIAL, PROTECTED, SECRET, UNCLASSIFIED, PUBLIC
Purpose: Document version number.
Example:
version: "1.0"Purpose: Document status in workflow.
Valid Values:
draft- Work in progressreview- Under reviewapproved- Approved for usefinal- Final version
Example:
status: draftPurpose: Brief description of document purpose and content.
Requirements:
- Recommended max 250 characters
- Will generate warning if longer
Example:
description: "Comprehensive project plan for AI capability enablement initiative"Purpose: Keywords for document search and categorization.
Example:
keywords: ["AI", "project plan", "DCCEEW", "capability", "enablement"]Purpose: Document subject or category.
Example:
subject: "Project Planning"Purpose: Explicitly enable or disable conversion for this document.
Valid Values:
true(default) - Document will be convertedfalse- Document will be skipped during conversion
Example:
convert: falseUse Cases:
- README files that should remain markdown-only
- Reference emails that don't need Word format
- System documentation not for distribution
- Work-in-progress notes
Purpose: Categorize document type for automatic exclusion rules.
Valid Values:
document(default) - Standard document, will be convertedemail- Email or communication, automatically excludedreference- Reference material, automatically excludednote- Notes or working documents, automatically excludedsystem- System documentation, automatically excluded
Example:
document_type: referenceAutomatic Exclusion:
Documents with document_type of email, reference, note, or system are automatically skipped during batch conversion.
The converter uses combination exclusion with both naming patterns and front matter:
Files matching these patterns are automatically excluded:
- README files:
README.md(case-insensitive) - Notes directory: Any file in
/notes/directory - References directory: Any file in
/reference/or/references/directory
Examples:
- ✗
README.md- Excluded - ✗
docs/notes/meeting-notes.md- Excluded - ✗
documents/references/email.md- Excluded - ✓
documents/deliverables/project_plan.md- Included
Method 1: Explicit Flag
---
convert: false
title: "Internal Notes"
---Method 2: Document Type
---
document_type: email
title: "Project Initiation Email"
---- Path pattern - Checked first (fastest)
convert: false- Explicit overridedocument_type- Automatic by category
Purpose: Controls how horizontal rules (---) are handled in Word documents.
Valid Values:
-
auto(default) - Section break only if---is followed by## Heading 2- Major section boundaries get independent formatting
- Minor dividers remain visual only
-
all- Every---creates a Word section break- Each section can have independent headers/footers
- Each section can have different page numbering
- Each section can have different orientation/margins
-
none- All---are visual dividers only- No section breaks created
- Entire document is one section
Example:
section_breaks: autoUse Cases:
auto: Most documents (intelligent sectioning)all: Documents needing independent section formattingnone: Simple documents, web content
Purpose: Controls when new slides are created in PowerPoint.
Valid Values:
-
h2(default) - New slide at every# H1and## H2- H1 creates title slides
- H2 creates content slides
-
h1- New slide only at# H1- More content per slide
- H2 and below stay on same slide
-
hr- New slide at every---horizontal rule- Manual control over slide breaks
- Ignore heading levels
Example:
slide_breaks: h2---
format: docx
title: "AI Capability Design & Enablement - Executive Brief"
author: "Dale Rogers"
date: "2025-11-10"
classification: "OFFICIAL"
version: "1.0"
status: final
description: "Executive decision brief presenting three delivery options for DCCEEW AI capability programme"
keywords: ["AI", "capability", "DCCEEW", "executive brief", "decision"]
subject: "Executive Briefing"
section_breaks: auto
---The converter performs strict validation with the following checks:
- Missing or invalid YAML syntax
- Missing required fields (
format,title) - Invalid enum values (format, status, section_breaks, slide_breaks)
- Invalid field types
- Heading hierarchy violations (H1 → H3 skip)
- Empty headings
- Table column count inconsistencies
- Missing recommended fields (author, date, classification, version, keywords)
- Date not in YYYY-MM-DD format
- Description > 250 characters
- Missing H1 title
- Code blocks without language tags
- Empty lists
md-convert document.md --format docx- Shows warnings in yellow
- Continues conversion
- Displays metadata summary
md-convert document.md --format docx --strict- Treats warnings as errors
- Fails conversion on any warning
- Use for production documents
md-convert document.md --format docx --no-validate- Skips all validation
- Faster for trusted documents
- Not recommended for production
If converting legacy documents without front matter:
- First conversion: Document will convert with warning: "No YAML front matter found"
- Default values: Uses filename as title, "MD Converter" as author
- Add front matter: Copy template from
examples/frontmatter-template.md - Reconvert: Re-run conversion with proper metadata
- Always include front matter for production documents
- Use
section_breaks: autofor most Word documents - Keep descriptions under 250 characters
- Use YYYY-MM-DD date format for consistency
- Add 3-5 keywords for searchability
- Set appropriate classification for security
- Update version number on significant changes
- Use
status: finalonly for approved documents
title→ Document Titleauthor→ Creatordescription→ Descriptionsubject→ Subjectkeywords→ Keywords (comma-separated)classification,version,status,date→ Custom Properties
title→ Presentation Titleauthor→ Authorsubject→ Subjectkeywords→ Keywordsdescription→ Descriptionclassification→ Footer on all slides (if present)
title→ Workbook Titleauthor→ Creatorsubject→ Subjectkeywords→ Keywordsdescription→ Description- Metadata sheet added if classification/version/status present
Version: 1.0
Last Updated: 2025-11-10