๐Markdown Automation
Comprehensive guide to automated markdown formatting and quality assurance
๐ฏ Overview
This guide covers the automated markdown linting system implemented to maintain consistent documentation quality across ProxmoxMCP. The system automatically detects, reports, and fixes common markdown formatting issues.
๐ ๏ธ Components
1. markdownlint-cli2
Purpose: Modern, fast markdown linting tool
Auto-fix: Automatically resolves 70%+ of formatting issues
Integration: Works with pre-commit, CI/CD, and local development
2. Configuration (.markdownlint.jsonc)
.markdownlint.jsonc)Customized Rules: Tailored for technical documentation
120-character line limit: Balances readability and display
Flexible HTML: Allows badges, details, and common HTML elements
3. Taskfile Integration
4. Pre-commit Hook
Automatic: Runs on every commit
Auto-fix: Applies fixes before commit
Fast: Only processes changed markdown files
5. GitHub Actions Workflow
PR Analysis: Automatic markdown quality checking
Auto-fix Commits: Pushes fixes directly to PR branches
Quality Reports: Detailed summaries and artifacts
๐ Quick Start
Install Tools
Basic Usage
๐ Common Issues & Auto-fixes
โ
Auto-fixable Issues
MD032
Lists not surrounded by blank lines
โ Adds blank lines
MD022
Headers not surrounded by blank lines
โ Adds blank lines
MD031
Code blocks not surrounded by blank lines
โ Adds blank lines
MD047
Files not ending with newline
โ Adds newline
MD009
Trailing spaces
โ Removes spaces
MD010
Hard tabs
โ Converts to spaces
MD012
Multiple consecutive blank lines
โ Removes extras
โ ๏ธ Manual Review Required
MD013
Line too long (>120 chars)
Break lines, shorter URLs
MD025
Multiple H1 headers
Restructure document
MD041
First line not H1
Add title or disable for snippets
MD029
Inconsistent list numbering
Manually renumber lists
๐ง Configuration Details
Line Length (MD013)
Allowed HTML (MD033)
Code Block Style (MD046)
๐ Workflow Integration
Local Development
Pre-commit: Automatic fixing on commit
Manual fixes:
task markdown:fixQuality check:
task markdown:summary
Pull Requests
Automatic analysis: GitHub Action runs on PR
Auto-fix commits: Fixes pushed to PR branch
Quality reports: Detailed analysis in artifacts
CI/CD Pipeline
๐ Quality Metrics
Before Automation
500+ formatting issues across documentation
Manual fixing: Time-intensive and inconsistent
Review overhead: Significant PR review time
After Automation
149 remaining issues (70% reduction)
Auto-fixing: Most issues resolved automatically
Consistent quality: Enforced formatting standards
๐๏ธ Advanced Usage
Exclude Specific Files
Custom Rule Configuration
Integration with IDEs
VS Code Extension
Vim/Neovim
๐ Troubleshooting
"markdownlint-cli2 not found"
"Too many issues to fix automatically"
"Pre-commit hook failing"
๐ฎ Future Enhancements
Planned Improvements
Custom rule development: Project-specific linting rules
Integration with documentation generators: Hugo, GitBook, etc.
AI-powered suggestions: Automated content improvements
Performance optimization: Faster linting for large documentation sets
Advanced Automation
Scheduled quality reports: Weekly documentation health checks
Integration with project management: Link quality metrics to milestones
Multi-language support: Extend to other markup formats
๐ Additional Resources
Project Taskfile: See markdown tasks
Pre-commit Configuration: Hook setup
๐ก Tip: Run
task markdown:summaryregularly to monitor documentation quality and catch issues early in development.
Last updated
Was this helpful?