fix(docs-infra): add the Exported by section to the API table of contents - #71145
Open
erkamyaman wants to merge 1 commit into
Open
erkamyaman wants to merge 1 commit into
erkamyaman wants to merge 1 commit into
Conversation
…ents `SectionDescription` writes a bare `<h2>Exported by</h2>` instead of using `SectionHeading`, so it is the only heading the API templates emit without an id. Across the built API pages there are 1023 `<h2 id="api">`, 336 `<h2 id="description">`, 225 `<h2 id="usage-notes">`, 13 `<h2 id="pipe-usage">` and 61 bare `<h2>`, all of them this one. API detail pages render a table of contents, and the loader selects `h2[id]`, so the section is missing from the ToC on all 61 pages, including every pipe and every `@ngModule`-tagged directive. It also has no anchor, so it cannot be linked to. Using `SectionHeading` gives it the `exported-by` id, the anchor link and the section margin the other headings get. The `<hr>` above it is dropped: it was the only rule in the API templates and stood in for the margin this heading never had, so keeping both left a rule and a 3rem gap doing the same job. `exported-by` is added to `KNOWN_API_SECTION_ANCHORS`, which the file asks to be kept in sync with the `SectionHeading` usages, so a JSDoc link to that fragment validates.
JeanMeche
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SectionDescriptionwrites a bare<h2>Exported by</h2>instead of usingSectionHeading, so it's the only API heading with no id, 61 pages, every pipe and@ngModuledirective. The ToC loader selectsh2[id], so the section is missing from the table of contents and has no anchor to link to.