[GH-ISSUE #1092] MD025 Multiple top-level headings withtitle frontmatter #607

Closed
opened 2026-03-03 01:28:25 +03:00 by kerem · 1 comment
Owner

Originally created by @drwpow on GitHub (Jan 3, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1092

  • Version: 0.32.1 (latest)
  • Node: 20

When using a markdown file with title frontmatter + a H1 like so:

---
title: Page Title
---

# Page Title

It throws the following error:

[MD025] Multiple top-level headings in the same document

Oddly enough, it only does this for title specifically; if there is anything else, it doesn’t throw.

Reproduction

If this is expected behavior, then maybe adding a note in the docs? I’m currently using this in a setup where the title frontmatter does not show anything on the page; it’s for the browser <title> and nothing else. Thanks!

Originally created by @drwpow on GitHub (Jan 3, 2024). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1092 - **Version**: `0.32.1` (latest) - **Node**: `20` When using a markdown file with `title` frontmatter + a H1 like so: ```md --- title: Page Title --- # Page Title ``` It throws the following error: ``` [MD025] Multiple top-level headings in the same document ``` Oddly enough, it only does this for `title` specifically; if there is anything else, it doesn’t throw. [Reproduction](https://github.com/drwpow/markdownlint-repro) If this is expected behavior, then maybe adding a note in the docs? I’m currently using this in a setup where the `title` frontmatter **does not** show anything on the page; it’s for the browser `<title>` and nothing else. Thanks!
kerem closed this issue 2026-03-03 01:28:25 +03:00
Author
Owner

@drwpow commented on GitHub (Jan 3, 2024):

Oh, sorry! I just found this configurable on the individual rule page. This seems intentional.

<!-- gh-comment-id:1875768786 --> @drwpow commented on GitHub (Jan 3, 2024): Oh, sorry! I just found [this configurable on the individual rule page](https://github.com/DavidAnson/markdownlint/blob/main/doc/md025.md). This seems intentional.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#607
No description provided.