Skip to content

fix(docs-infra): add the Exported by section to the API table of contents - #71145

Open
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:fix-exported-by-section-heading
Open

erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:fix-exported-by-section-heading

Conversation

@erkamyaman

Copy link
Copy Markdown
Contributor

SectionDescription writes a bare <h2>Exported by</h2> instead of using SectionHeading, so it's the only API heading with no id, 61 pages, every pipe and @ngModule directive. The ToC loader selects h2[id], so the section is missing from the table of contents and has no anchor to link to.

…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.
@pullapprove
pullapprove Bot requested a review from MarkTechson October 2, 2026 20:13
@angular-robot angular-robot Bot added the area: docs-infra Angular.dev application and infrastructure label Oct 2, 2026
@ngbot ngbot Bot added this to the Backlog milestone Oct 2, 2026
@JeanMeche
JeanMeche removed the request for review from MarkTechson October 2, 2026 20:20
@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: docs-infra Angular.dev application and infrastructure target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants