Skip to content

Sitemap: list API pages in their own sitemap below a sitemap index - #4979

Merged
reakaleek merged 14 commits into
mainfrom
api-sitemap-index
Nov 20, 2026
Merged

reakaleek merged 14 commits into
mainfrom
api-sitemap-index

Conversation

@reakaleek

@reakaleek reakaleek commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Why

  • Search engines need the API pages that may be indexed and that name themselves as canonical. Today the sitemap drops every /docs/api URL.
  • The RFC lists older majors in the sitemap even though they are hidden in the navigation.
  • Part of the API default version and indexing work. Unblocks the API lastmod work, the crawl check, and the Bump.sh cutover.

Closes elastic/docs-eng-team#1219

What

  • /docs/sitemap.xml is now a sitemap index over sitemap-docs.xml (narrative pages) and sitemap-api.xml (API pages). The index keeps the URL that Search Console already knows.
  • The page type of each API tree decides what the API file lists: the versionless pages and older majors. It leaves out /next, the numbered copy of the newest major, redirects and .md renderings.
  • API pages reach the sitemap only where the assembler-api-explorer flag renders them, so production lists none until the cutover.

Notes

  • assembler sitemap rewrites only the narrative pages with dates from the search index and keeps the API file of the build. The search index holds operations, not pages: it lacks the group and type pages, and it has documents for operation URLs that redirect. API lastmod stays the build time until the follow-up issue on content dates.
  • The deploy workflow uploads only sitemap.xml after assembler sitemap. elastic/docs-internal-workflows#1251 uploads and invalidates every sitemap*.xml file. It works with the current docs-builder too, so it can merge first.
  • The narrative sitemap content does not change: the verified snapshot of the in-memory build is identical, now read from sitemap-docs.xml.

🤖 Generated with Claude Code

sitemap.xml becomes an index over sitemap-docs.xml and sitemap-api.xml. The page type of each API tree decides which pages the sitemap lists: versionless pages and older majors, not /next or the numbered copy of the newest major. `assembler sitemap` rewrites the narrative pages and keeps the API file of the build, because the search index holds operations, not pages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@reakaleek
reakaleek requested a review from a team as a code owner November 20, 2026 08:13
@reakaleek
reakaleek requested a review from theletterf November 20, 2026 08:13
@github-actions

Copy link
Copy Markdown
Contributor

reakaleek and others added 7 commits November 20, 2026 09:28
…view by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…@infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…w by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…st (per review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
reakaleek and others added 2 commits November 20, 2026 09:38
…ew by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…oad (per review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
reakaleek and others added 2 commits November 20, 2026 10:02
…s.txt (per review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eview by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@reakaleek
reakaleek merged commit 48858f3 into main Nov 20, 2026
44 checks passed
@reakaleek
reakaleek deleted the api-sitemap-index branch November 20, 2026 09:28
reakaleek added a commit that referenced this pull request Nov 24, 2026
* Leave the API Servers pages out of the sitemap and the index

The Servers page exists only so old Bump.sh links land. PR #4979 listed it in `sitemap-api.xml` after a review comment, which put 9 `/servers` URLs in the live sitemap.

`StructuralNavigationItem` now reports `InSitemap` and `ExcludeFromIndexing` as false and true for Servers. The page renders `noindex`, so the sitemap and the robots meta agree. The Authentication page stays listed and indexed, even when the sidebar hides it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* fix: let hidden Authentication pages render as indexable (per review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* test: pin that a hidden version tree keeps an indexable landing (per review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* fix: keep the landing of a hidden version tree indexable (per review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Jan Calanog <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant