Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make first-heading-level configurable #51

Closed
wants to merge 2 commits into from
Closed

Make first-heading-level configurable #51

wants to merge 2 commits into from

Conversation

michaelmior
Copy link
Contributor

It would be nice if an option could be provided to the first-heading-level rule to set it to something other than 1. I have a case where all my Markdown files should start at level 2 instead.

@wooorm
Copy link
Member

wooorm commented Mar 31, 2016

What's the case?

@michaelmior
Copy link
Contributor Author

I have a series of Markdown files which represent articles. The article title is in the metadata and gets rendered into the top-level heading in a separate section of the template from the content. The article content should only contain headings starting at the second level.

@wooorm
Copy link
Member

wooorm commented Apr 1, 2016

OK, I’ll accept a PR for this!

@michaelmior
Copy link
Contributor Author

This looks pretty straightforward save for one caveat. This has an obvious interaction with the no-multiple-toplevel-headings rule. Is there currently any way to share settings between rules? If not, is it reasonable to just make this option required for both rules and leave it to the user to set them to the same value?

@wooorm
Copy link
Member

wooorm commented Apr 3, 2016

No, there’s no way to do that. I think it’s reasonable to to leave it up to the user!

@michaelmior
Copy link
Contributor Author

Updated both rules to allow specification of the heading level.

@wooorm
Copy link
Member

wooorm commented Apr 3, 2016

👍 merging!

@wooorm wooorm closed this in 7f4a51e Apr 3, 2016
@wooorm
Copy link
Member

wooorm commented Apr 3, 2016

I’ll release this once travis completes.

@wooorm wooorm added the 🦋 type/enhancement This is great to have label Apr 3, 2016
@wooorm
Copy link
Member

wooorm commented Apr 3, 2016

Released in 3.1.0!

@michaelmior
Copy link
Contributor Author

Awesome! Thanks :)

@wooorm
Copy link
Member

wooorm commented Apr 3, 2016

👍

@wooorm wooorm added ⛵️ status/released 🗄 area/interface This affects the public interface 🧒 semver/minor This is backwards-compatible change labels Aug 15, 2019
@wooorm wooorm added the 💪 phase/solved Post is done label Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 🧒 semver/minor This is backwards-compatible change 🦋 type/enhancement This is great to have
Development

Successfully merging this pull request may close these issues.

2 participants