elastic / docs

246 stars 334 forks source link

Handle more heading levels #3060

Closed colleenmcginnis closed 3 weeks ago

colleenmcginnis commented 3 weeks ago

In support of https://github.com/elastic/observability-docs/pull/4230

In https://github.com/elastic/observability-docs/pull/4230 I noticed that page subheadings in deeply-nested pages weren't working as expected. The highest heading level I found was h10, but in this PR I added logic for up to h12. Here's an example of before/after this PR:

Before
(h10, no formatting)
After
(h3, with formatting)
Screenshot 2024-09-10 at 2 57 48 PM Screenshot 2024-09-10 at 2 59 55 PM

Note: Headings beyond h6 are not technically valid HTML tags, but the build system will create them so we should handle them appropriately.

github-actions[bot] commented 3 weeks ago

A documentation preview will be available soon.

Request a new doc build by commenting * Rebuild this PR: `run docs-build` * Rebuild this PR and all Elastic docs: `run docs-build rebuild` `run docs-build` is much faster than `run docs-build rebuild`. A `rebuild` should only be needed in rare situations. If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status [here](https://buildkite.com/elastic/docs-build).
bmorelli25 commented 3 weeks ago

wow, passing tests on the first go? Waiting for the preview to review...