Skip to content

fix: honor TOC metadata while preserving file metadata overrides - #11140

Merged
vicancy merged 2 commits into
dotnet:mainfrom
vicancy:fix-toc-metadata-precedence
Sep 18, 2026
Merged

vicancy merged 2 commits into
dotnet:mainfrom
vicancy:fix-toc-metadata-precedence

Conversation

@vicancy

@vicancy vicancy commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #10977.

Use fileMetadata > toc.yml > globalMetadata, as agreed in the issue discussion. TOC settings override global defaults, while matching file metadata can still override the TOC, including pdf: false and PDF filenames. Markdown front matter precedence is unchanged.

Keep global defaults and matching file overrides separate when loading TOCs. Preserve existing file-pattern matching/order and per-key replacement, including explicit null and empty values. Update the configuration and PDF documentation.

Regression coverage includes root/nested TOCs, both boolean directions, three-layer conflicts, fallback, null/empty values, whole-object replacement, and generated toc.json output.

Validation: 140 build-component tests passed (3 skipped); 5 targeted docset integration tests passed on .NET 10. Both runs built with warnings as errors. The previous PR behavior fails 16 new component cases and both new docset cases.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bf666f99-8d30-4763-878d-b566c0ac2f2d
Apply fileMetadata > inline TOC metadata > globalMetadata without changing Markdown front matter precedence. Cover conflicts, fallback, explicit values, and generated TOC JSON.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@vicancy vicancy changed the title fix: preserve TOC metadata over configured defaults fix: honor TOC metadata while preserving file metadata overrides Sep 18, 2026
@vicancy
vicancy merged commit 8fbb7db into dotnet:main Sep 18, 2026
9 checks passed
@vicancy
vicancy deleted the fix-toc-metadata-precedence branch September 18, 2026 06:18
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

Successfully merging this pull request may close these issues.

[Bug] globalMetadata overwrites the pdf setting in toc.yml

2 participants