Commonplace Book

Pandoc Numbering Sections

Jan 29, 2025

When exporting from markdown to HTML you may want to switch from using H1s to H2s for the content since HTML should not include more than a single H1. To achieve this you can pass the option --shift-headaing-level-by=1 to Pandoc. This will shift all headings down by one level, making H2s into H3s, H3s into H4s, and so on.