Skip to content

New Rule: single-h1 #373

Closed
Closed
@Pixel998

Description

@Pixel998

Rule details

This rule enforces that a Markdown document contains at most one top-level heading.

What type of rule is this?

Warns about a potential problem

Example code

Examples of incorrect code:

# Top level heading

# Another top-level heading

Participation

  • I am willing to submit a pull request to implement this rule.

Additional comments

Rationale: Using multiple h1 elements can disrupt the semantic hierarchy of a document. Search engines and assistive technologies rely on a clear heading structure to understand the content's organization. A single h1 clearly identifies the primary topic.

Prior Art:
MD025

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions