๐Ÿ“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)

  • 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

Rule
Issue
Auto-fix

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

Rule
Issue
Resolution

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

  1. Pre-commit: Automatic fixing on commit

  2. Manual fixes: task markdown:fix

  3. Quality check: task markdown:summary

Pull Requests

  1. Automatic analysis: GitHub Action runs on PR

  2. Auto-fix commits: Fixes pushed to PR branch

  3. 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


๐Ÿ’ก Tip: Run task markdown:summary regularly to monitor documentation quality and catch issues early in development.

Last updated

Was this helpful?