Docgen tweaks

- Only output documentation sections with content
- Enable hierarchy images in markdown with `-h` or `--hierarchy-images`

Or should `-h` be on by default and we use a flag to disable it instead? I assumed enable explicitly as it relies on another step being run too.