Skip to content

Fix heading structure #461

@jtiala

Description

@jtiala

Blog posts are generated from markdown. It's pretty natural to structure the headings starting from h1 (# heading) in markdown, but this results in bad heading structure in the resulting web page. At the moment we have pages that look like this:

<h1>Blog post title from markdown frontmatter</h1>
<h1># First level heading from markdown</h1>
<p>...</p>
<h2>## Second level heading from markdown</h2>
<p>...</p>
<h1># First level heading from markdown</h1>
<p>...</p>

Correct structure would be

<h1>Blog post title from markdown frontmatter</h1>
<h2># First level heading from markdown</h2>
<p>...</p>
<h3>## Second level heading from markdown</h3>
<p>...</p>
<h2># First level heading from markdown</h2>
<p>...</p>

We should limit the headings generated from markdown to be no higher level than h2. Some posts might start from h2 already, so we cant just do heading + 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions