Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip empty Contents section #251

Open
izmalk opened this issue Aug 5, 2024 · 0 comments
Open

Skip empty Contents section #251

izmalk opened this issue Aug 5, 2024 · 0 comments

Comments

@izmalk
Copy link

izmalk commented Aug 5, 2024

  • In a very specific case when our docs don't have multiple pages and the Contents section is empty we should not add the Contents heading because it has no content.
  • Also, the heading in this case is added as the first level heading which is equivalent to the Documents title. The best practice is to have only one first-level heading - at the very beginning of the document.

I think we should never be able to generate the first-level heading for anything except the page's title. And we should skip the Contents heading if it has nothing inside.

Example

canonical/karapace-operator#15 -- In this PR we add simple documentation to a product, consisting of a single page.

See the Discourse topic for the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant