adrianvlupu / C4-Builder

This is a documentation builder. You feed it .md and .puml and it exports a site, pdf, or a markdown with navigation.
https://adrianvlupu.github.io/C4-Builder/
MIT License
563 stars 93 forks source link

Fix markdown heading levels #11

Open kevinbader opened 4 years ago

kevinbader commented 4 years ago

Problem description

c4builder currently assumes that markdown files don't use h1 (#) and h2 (##) headers. For example:

image

If you don't know this, you might be tempted to start with a h1 heading, which is what you'd usually do. Then it looks like this:

image

This is probably not what you want. Even more obvious in case of generated markdown:

# test

* [Overview](#Overview)
* [src](#src)
  * [foo](#foo)

---

## Overview

# Top-level readme h1

top-level readme content

And here's the PDF view:

image

Thoughts

Thoughts?