bep / docuapi

Beautiful multilingual API documentation theme for Hugo
https://docuapi.netlify.app/
Other
750 stars 200 forks source link

Titles: front-matter and headings not in the toc #50

Open eine opened 4 years ago

eine commented 4 years ago

This issue is to ask two questions about titles in this theme.

On the one hand, title fields in the front-matter of markdown files in content seem to be ignored. I removed them and I found no difference in the output. If this is the expected behaviour, I'd ask to consider changing it so that title fields are used as # headings. Naturally, this would imply removing explicit # headings, to avoid duplication.

On the other hand, I didn't find how to add headings which are not included in the TOC (sidebar). I could use <h1>Title</h1> instead of # Title. However, doing so breaks the dynamic behaviour of the sidebar: level 1 items are shown only, none of them is expanded/collapsed.

Hence, I think that these two questions might be tightly related, since applying the former would probably break the sidebar.

bep commented 4 years ago

This is more or less a direct port of Slate, and I think this behaves the same here as there. I haven't thought too hard about this, but changing this would certainly be a somewhat breaking change. If enough people shout "yes, please", then we can do it.