Currently, when a directory does not have a README.md file in it, there is no subsection generated for the other items in that directory. This causes those items to be added as subitems to the lexicographically-previous item.
For example, the following directory structure:
some_file.md
subsection/
foo.md
bar.md
Would generate the following SUMMARY.md:
[Some File](some_file.md)
- [Foo](foo.md)
- [Bar](bar.md)
Which is confusing to read.
Easiest way to handle this is to log and throw an error if we detect a directory structure that is non-empty, but doesn't contain a README.md file.