[GH-ISSUE #1493] MD025: front_matter_title: "" does not disable title checking #697

Closed
opened 2026-03-03 01:29:10 +03:00 by kerem · 1 comment
Owner

Originally created by @ianlewis on GitHub (Feb 17, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1493

According to the docs you should be able to disable checking for a frontmatter title by setting the front_matter_title setting to "".

To disable the use of front matter by this rule, specify "" for front_matter_title.

However, this doesn't seem to work and MD025 violations will not be reported if front_matter_title is set to "" and a frontmatter title exists.

$ npm ls -a | grep markdownlint
├─┬ markdownlint-cli@0.44.0
│ ├─┬ markdownlint@0.37.4

$ grep -A2 MD025 .markdownlint.yaml 
# MD025/single-title/single-h1 - Multiple top-level headings
MD025:
  # Disable checking of YAML frontmatter.
  front_matter_title: ""

$ cat <<EOF > test.md
> ---
> title: Test
> ---
> 
> No h1 heading.
> EOF

$ npx markdownlint test.md && echo "no errors"
no errors
Originally created by @ianlewis on GitHub (Feb 17, 2025). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1493 According to the [docs](https://github.com/DavidAnson/markdownlint/blob/main/doc/md025.md) you should be able to disable checking for a frontmatter title by setting the `front_matter_title` setting to `""`. > To disable the use of front matter by this rule, specify "" for front_matter_title. However, this doesn't seem to work and MD025 violations will not be reported if `front_matter_title` is set to `""` and a frontmatter title exists. ```shell $ npm ls -a | grep markdownlint ├─┬ markdownlint-cli@0.44.0 │ ├─┬ markdownlint@0.37.4 $ grep -A2 MD025 .markdownlint.yaml # MD025/single-title/single-h1 - Multiple top-level headings MD025: # Disable checking of YAML frontmatter. front_matter_title: "" $ cat <<EOF > test.md > --- > title: Test > --- > > No h1 heading. > EOF $ npx markdownlint test.md && echo "no errors" no errors ```
kerem closed this issue 2026-03-03 01:29:10 +03:00
Author
Owner

@ianlewis commented on GitHub (Feb 17, 2025):

Oops. I got this confused with MD041

<!-- gh-comment-id:2663306247 --> @ianlewis commented on GitHub (Feb 17, 2025): Oops. I got this confused with MD041
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#697
No description provided.