Skip to content

Unify header levels (Gatsby source) #121

@oldenbourglaura

Description

@oldenbourglaura

Description

The Gatsby chapters start with one h1 (chapter title), and then have a lot more h1s (sub-chapters). So ideally, to unify this wit the rest of the material, in the Gatsby material we would keep the first h1, and then bump all headers one level down.

Input in HTML

  1. All occurences of h5 (<h5></h5>) should be turned into h6 (<h6></h6>)
  2. All occurences of h4 (<h4></h4>) should be turned into h5 (<h5></h5>)
  3. All occurences of h3 (<h3></h3>) should be turned into h4 (<h4></h4>)
  4. All occurences of h2 (<h2></h2>) should be turned into h3 (<h3></h2>)
  5. All occurences of h1 (<h1></h1>) apart from the first one should be turned into h2 (<h2></h2>)
  6. One occurence of h1 (the first one, which is the chapter title) should remain

Expected output in Wikitext

see above

Example file

Additional information

none

Metadata

Metadata

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions