Skip to content

Add a script to validate Markdown formatting in documentation #54795

@Abhijais4896

Description

@Abhijais4896

Problem

The Kubernetes website repository contains a large number of Markdown files under the content/ directory. Over time, formatting inconsistencies may appear such as:

Incorrect heading hierarchy

Trailing whitespace

Missing alt text for images

Improper list formatting

Broken or empty Markdown links

Currently, these issues are mostly detected during manual review, which can be time-consuming for maintainers and contributors.

Proposed Solution

Introduce a script that automatically validates Markdown formatting across the repository.

The script could scan Markdown files and check for:

Incorrect heading order (e.g., H1 → H3 skipping H2)

Trailing whitespace

Empty or malformed links

Images without alt text

Inconsistent list indentation

This script could run locally by contributors before submitting pull requests.

Benefits

Improves documentation consistency

Reduces manual review effort for maintainers

Helps contributors follow formatting standards

Improves overall readability of the documentation

If the maintainers think this would be helpful, I would be happy to work on implementing this script and submit a pull request.

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions