Repository navigation
Add API topic pages under a Topics heading, preferring children: - #4628
Merged
Merged
Conversation
Topic URLs such as /topic/topic-kibana-spaces returned 404 because nothing parsed the x-topics extension. Specs with x-topics now get one page per topic, listed under a Topics sidebar heading above the endpoint groups. A topic named Authentication becomes the /authentication page. The docset's children: pages are only a fallback for specs without x-topics, and a replaced child redirects to the topic with the same title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spec order differed per product, so the same topic moved around between APIs. Authentication and Rate limiting now come first, and the other topics follow alphabetically. The pinned titles live in one list on TopicsNavigationItem. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mpdreamz
requested changes
Oct 28, 2026
Mpdreamz
left a comment
Member
There was a problem hiding this comment.
I'm hoping to migrate these to regular markdown pages instead.
Only x-topics follow the pinned and alphabetical order; children: pages keep the order the docset declares. A child page headed Authentication now redirects to /authentication instead of being dropped when the spec has an Authentication topic. A generate test checks the topic pages and the topic-authentication redirect on disk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4628/ Sample changed pages: |
The team now deprecates x-topics in favour of children: pages, which render through the full Markdown pipeline and can hold pages such as the Elasticsearch API conventions. A product that declares children: lists those pages under Topics and ignores the spec's x-topics. A topic URL redirects to the child page with the same first heading, so bump.sh links keep working. Products without children: still get their x-topics pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@Mpdreamz agreed, and this PR now follows that direction. We inverted the decision in elastic/docs-eng-team#820:
The change is in 6b6d3bf, and 037490b leaves the redirects to docs-infra. |
Topic pages are now the union of the docset's children: pages and the spec's x-topics. A child page replaces a topic when its first heading matches the topic title or its text matches the topic content, and the topic URL redirects to it. Other topics still render, after the children: pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mpdreamz
approved these changes
Oct 28, 2026
The build no longer writes redirect pages for x-topics entries that a children: page replaces, or for topic-authentication. Those bump.sh URLs redirect in the CloudFront configuration in elastic/docs-infra, like the other API page redirects. The sitemap parity test mirrors the new entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A children: page now answers to the URLs of the x-topics entries it replaces, so the version switcher links it with the topic page another version still builds. The build still writes no redirect pages for them. A child that replaces the Authentication topic in a spec without security schemes logs a warning, because /authentication then needs a redirect in elastic/docs-infra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Another version builds an Authentication topic at /authentication, not at /topic/topic-authentication. A child page that replaces that topic now also answers to /authentication in the version switcher, unless its own spec declares security schemes and so keeps a generated Authentication page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Topics heading is built in its own method, so CreateNavigation reads as tags, schemas, topics, then structural pages. The spec's security schemes are checked once, the Authentication name for the version switcher comes from a small helper, and page collection skips any sidebar heading. The landing page shares one row for topic, child, and structural pages, and two tests share a helper for their child file. Behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenApiTopic and ApiTopicPage carried the same title and content. The x-topics parser now returns ApiTopicPage directly, and IsAuthentication is a property of the page, so the builder hands the parsed topic straight to the navigation item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApiMarkdown.RenderWithHeadings renders prose with anchors on its headings and returns them for the table of contents, leaving out headings whose slug another part of the page owns. The topic page and the Authentication topic intro both use it instead of repeating the read, collect, and render steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApiTopicsNavigationBuilder in Topics/ now builds the Topics heading, including the children: pages, next to the topic page types. ApiNavigationBuilder makes one call to it. Topic and child page URLs come from ApiUrlBuilder, and the check whether a child page covers a topic is ApiTopicPage.IsCoveredBy. Behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Topic titles that differ only in case or spacing, such as Rate limiting and Rate Limiting, produced the same URL, and the later page silently replaced the earlier one. The first entry now wins and the build logs a warning naming the skipped entry. Two Authentication entries count as the same page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Topics and Types are both page-less groups of the API sidebar, so they share ApiSidebarHeadingNavigationItem: a plain heading that points at the product overview. Types was a folder that linked to its first schema page, and it now expands without navigating. A divider sets Types apart from the endpoint groups, as one already does for the topics. Type page breadcrumbs lose the Types crumb, which linked to the first schema page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both blocks after the Topics heading added a divider when something came before them, then the block itself. AddSection does that once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
theletterf
approved these changes
Oct 28, 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.
The API Explorer now lists topic pages under a Topics sidebar heading, above the endpoint groups. The heading shows a product's
children:pages first, then a page for each entry of the OpenAPIx-topicsextension that no child page covers. bump.sh topic URLs such as/topic/topic-rate-limitingstop returning 404.Affects: API reference, Configuration
Prompt summary: Fix elastic/docs-eng-team#820 and the docs-builder side of elastic/docs-eng-team#1104. The first decision in elastic/docs-eng-team#820 was to prefer
x-topicsand fall back tochildren:. After review, the team inverted it: the two sources are combined with priority tochildren:pages, andx-topicsis deprecated, with the migration after GA.children:pages also carry pages such as the Elasticsearch API conventions in elastic/docs-eng-team#1135.Why
Nothing parses
x-topics, so the Kibana, Kibana serverless, and Elastic Cloud topic pages that bump.sh serves have no native page. Cloud Billing has nosecuritySchemes, so its/authenticationpage is not generated either: bump.sh builds it from anx-topicsentry titledAuthentication. The sitemap parity test reports these as 8 of the 14 missing pages in elastic/docs-eng-team#1104.What
Topics sidebar heading
Topic pages sit under a Topics heading, in both the default and the preview navigation. The heading only appears when a product has at least one topic page. The breadcrumb folds it into the spec crumb, like an
x-tagGroupsheading.children:pages first, thenx-topicsThe Topics heading lists the
children:pages in the declared order, then the spec's topics. A child page covers a topic when its first heading matches the topic title or its text matches the topic content. A covered topic gets no page, so Kibana listskibana-api-overviewand builds no Kibana spaces topic page. The build writes no redirect pages for topics. elastic/docs-infra#493 redirects the bump.sh topic URLs, such as/topic/topic-kibana-spacestokibana-api-overview. The child page keeps the replaced topic URLs as page names, so the version switcher still matches it with the topic page in a version that builds one.x-topicspagesEach topic that no child covers renders at
/topic/topic-<slug>, the same URL as on bump.sh. When two entries produce the same URL, the first one wins and the build logs a warning. Authentication comes first and Rate limiting second, and the other topics follow alphabetically. The pinned titles are one list,TopicsNavigationItem.PinnedTitles.topicjoins the reserved slugs forchildren:files.Authentication topic
A topic titled
Authenticationdoes not get its own topic page. Its content opens the/authenticationpage, above the security schemes, and that page is listed under Topics. elastic/docs-infra#493 redirects/topic/topic-authenticationthere, as on bump.sh. This also works for a spec without security schemes, which fixescloud-billing/authentication.Types is a heading, after a divider
Topics and Types are both page-less groups, so they share one sidebar heading type that points at the product overview. Types used to be a folder that linked to its first schema page; it now only expands. A divider sets Types apart from the endpoint groups, as one already does for Topics. Type page breadcrumbs lose the Types crumb, which linked to that first schema page.
Sitemap parity test
The test now mirrors the exact page redirects from elastic/docs-infra#493 and elastic/docs-infra#494. They cover the
/serverspages, the renamed Cloud Billing budgets group, the topic URLs this PR builds no page for, and the Streams operations Kibana removed from its 9.6 spec. With this PR and both redirect PRs, every production API sitemap page resolves. Those redirects apply on staging and edge only, until the cutover.Out of scope: Expanding the Topics heading by default is in #4629, on top of this PR. Moving
x-topicscontent tochildren:pages is tracked in elastic/docs-eng-team#1144, after GA. Elasticsearch topic pages are tracked in elastic/docs-eng-team#1143 and elastic/docs-eng-team#1135. The landing page still does not show its topic list, as before.Verify
To check the sitemap parity against a staging build:
dotnet run --project src/tooling/docs-builder -- assembler build --environment staging --no-assume-build FEATURE_ASSEMBLER_API_EXPLORER=true dotnet run --project tests/Elastic.Documentation.Build.Tests/ -- --treenode-filter '/*/*/ApiSitemapParityTests/*'Check on the preview
children:page, listed first under Topics. The spec's Kibana spaces topic gets no page.children:page covers the topic, so thex-topicspage renders.apiKeyscheme.x-topicsand nochildren:, so no Topics heading.