[Idea] Heading offsets
hdodov opened this issue · comments
This field is likely to be used for stuff like blog posts. There, you'd want to have one <h1>
(which is the title
field) and perhaps a subtitle (which might be a subtitle
field). This is just good SEO and is how Medium works. This means that in your content, you'll mainly have <h3>
and up (again, how Medium works as well). This is also an argument for #8.
My argument is that in the editor, you'll likely be writing ###
and ####
most of the time, which can get annoying. My proposal is to be able to configure a "heading offset" that specifies the starting heading index.
For example, the default heading offset could be 0
, which means:
#
==<h1>
##
==<h2>
- and so on...
However, if you set headingOffset: 2
, you get:
#
==<h3>
##
==<h4>
- and so on...
This is useful for two reasons:
- You get a better writing experience since you won't be counting hash symbols.
- If at some point you wish to change the heading hierarchy, you just change the heading offset. For example, if I had
headingOffset
set to2
and I want all<h3>
to turn into<h2>
(and all others to be adjusted accordingly), I would simply reduceheadingOffset
by1
. I wouldn't have to change the content at all.