DavidAnson / markdownlint

A Node.js style checker and lint tool for Markdown/CommonMark files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MD025 Multiple top-level headings with`title` frontmatter

drwpow opened this issue · comments

  • 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!

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