Skip to content

Document suppress in toc.yml and when to restructure instead - #4559

Open
Mpdreamz wants to merge 1 commit into
mainfrom
docs/toc-suppress
Open

Mpdreamz wants to merge 1 commit into
mainfrom
docs/toc-suppress

Conversation

@Mpdreamz

Copy link
Copy Markdown
Member

The configure reference now says that nested toc.yml files accept suppress: too, how far it reaches, and when to restructure to folder: instead.

Affects: Configuration, Authoring

Prompt summary: Document that suppress: is valid in nested toc.yml files and not only docset.yml, with its scope and the three hint names, and fix the stale comment on TableOfContentsFile.SuppressDiagnostics. This supports the diagnostic-noise cleanup in https://github.com/elastic/docs-eng-team/issues/1115 (part of).

Why

docs/documentation/isolated/configure/index.md describes suppress: for docset.yml only, yet TableOfContentsFile.SuppressDiagnostics reads it from toc.yml as well. The XML comment on that property lists two of the three HintType values.

What

Where suppress: applies

The docs now state that suppress: is valid in docset.yml and in nested toc.yml files. A toc.yml list covers only the entries in that file, and a toc.yml does not inherit the docset.yml list. AutolinkElasticCoDocs is raised during Markdown parsing, so it is only read from docset.yml.

Preferring folder: over suppressing

The DeepLinkingVirtualFile section recommends folder: with file: index.md, and warns that a folder: with explicit children must list every Markdown file or the build fails with "is not listed in the table of contents". It also notes that the move can change URLs.

XML comment

TableOfContentsFile.SuppressDiagnostics now lists all three hint types. This is a comment-only change. The hardcoded docs-content list in DocumentationSetFile.cs is untouched.

Verify

Scratch docset with docset.yml (file: top/deep.md with children) and a nested sub/toc.yml (file: other/x.md with children). Run:

docs-builder build --path <docset> --output <out> --force --skip-cross-links

Without suppress:, two uses deep-linking with children hints appear (other/x.md and top/deep.md). With suppress: [DeepLinkingVirtualFile] added to sub/toc.yml, only the top/deep.md hint remains. dotnet build src/Elastic.Documentation.Configuration succeeds.

🤖 Generated with Claude Code

Nested toc.yml files accept suppress too, scoped to their own entries. The docs only covered docset.yml, and the XML comment on TableOfContentsFile.SuppressDiagnostics listed two of the three hint types.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4559/

Sample changed pages:

@Mpdreamz
Mpdreamz marked this pull request as ready for review October 22, 2026 15:08
@Mpdreamz
Mpdreamz requested a review from a team as a code owner October 22, 2026 15:08
@Mpdreamz
Mpdreamz requested a review from theletterf October 22, 2026 15:08
file: index.md
```

When you switch to `folder:` with `file: index.md` and no `children`, the folder picks up every Markdown file automatically. If you give the `folder:` explicit `children`, list every Markdown file in the folder, or the build fails with "is not listed in the table of contents" for each file you leave out. Moving the page to `folder:` can change its URL, so check the URLs before and after.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: P3 (Low)

folder: with file: index.md does not auto-discover the other Markdown files, even when children is omitted. The YAML converter inserts the index as an explicit child, so folder resolution skips auto-discovery. Following this example in a multi-page folder therefore produces the same unlisted-page errors warned about here. Recommend a bare folder: for auto-discovery, or include the remaining pages as explicit children.

Generated by Libra. React with 👍 or 👎 to give feedback on this comment.

This branch was successfully deployed

2 active deployments
docs-preview — ad255cca Deployed Oct 22, 2026 by github-actions[bot]
assembler-preview — ad255cca Deployed Oct 22, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant