mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Update MD001/heading-increment to support front matter title as the first heading of the page.
This commit is contained in:
parent
a366f80873
commit
1b6839bff0
21 changed files with 317 additions and 16 deletions
|
@ -26,6 +26,15 @@ level at a time:
|
|||
### Another Heading 3
|
||||
```
|
||||
|
||||
If [YAML](https://en.wikipedia.org/wiki/YAML) front matter is present and
|
||||
contains a `title` property (commonly used with blog posts), this rule treats
|
||||
that as a top level heading and will report a violation if the actual first
|
||||
heading is not a level 2 heading. To use a different property name in the
|
||||
front matter, specify the text of a regular expression via the
|
||||
`front_matter_title` parameter. To disable the use of front matter by this
|
||||
rule, specify `""` for `front_matter_title`. When front matter is not present,
|
||||
the first heading can be any level.
|
||||
|
||||
Rationale: Headings represent the structure of a document and can be confusing
|
||||
when skipped - especially for accessibility scenarios. More information:
|
||||
<https://www.w3.org/WAI/tutorials/page-structure/headings/>.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue