framework
framework copied to clipboard
A way to opt-out of h1 + h2 treating the h2 as a subtitle?
trafficstars
As an alternative:
# Heading 1
<div><!-- heading 2 is not a subtitle --></div>
## Heading 2
Or:
# Heading 1
<div><h2>Heading 2</h2></div>
The OP was also about referencing H2 and H3. One way to do so would be to make the selector configurable—currently it's set here https://github.com/observablehq/framework/blob/9c1d5ca61c931083f78833ca28275c96a7dadb86/src/render.ts#L175
But opening this might make things too complicated. One issue with multiple levels in the TOC is that the hierarchy needs to be reflected visually.
@Fil i think that should be a separate issue, if we want the TOC to be configurable.