mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #199] MD025/single-title/single-h1 #169
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#169
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AliceonFire on GitHub (Jun 15, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/199
The MD025 rule complains about "Multiple top-level headings in the same document" seemingly because there is a title in the article's YAML frontmatter along with an h1 heading in the same document. I can't think of why else the warning would appear. Is this intentional?
Single opinions such as MD026/no-trailing-punctuation can be disregarded easily enough, but it seems MD025 could be useful with separation of the single-title and single-h1 rules. Would it be possible to toggle this decoupling in a setting rather than turning the rule off entirely?
@DavidAnson commented on GitHub (Jun 15, 2019):
This is deliberate (for the reason you suggest) and is customizable. The rule documentation explains more: https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md025---multiple-top-level-headings-in-the-same-document
@AliceonFire commented on GitHub (Jun 15, 2019):
The MD025 rule documentation states
To disable the use of front matter by this rule, specify "" for front_matter_title.This is not seen as a valid editor configuration setting:
Placing it within a markdown file's YAML frontmatter also has no effect:
Where is the specification of "front_matter_title" to be carried out?
@DavidAnson commented on GitHub (Jun 15, 2019):
This part of the documentation outlines what the configuration object should look like: https://github.com/DavidAnson/markdownlint#optionsconfig
Rule parameters are nested; here is a specific example for your scenario:
github.com/DavidAnson/markdownlint@6f7c0aac13/test/hugo-quickstart-example-clean.jsonJust in case you are using the VS Code extension, here's what things looks like in the configuration for that editor: https://github.com/DavidAnson/vscode-markdownlint#markdownlintconfig
titleattribute in frontmatter #1946