Repository navigation
API Explorer: serve pages at /docs/api/<key> instead of /docs/api/doc/<key> - #4951
Merged
Merged
Conversation
…<key> The API Explorer replaces bump.sh, so its pages drop the bump.sh-era `/doc` segment before the cutover. Readers then see one URL change. Links to a host that still proxies bump.sh keep the `/doc` form: www.elastic.co, and any environment without the `assembler-api-explorer` flag. `/doc` links in content and in older link indexes keep working, and the link check hints at their URL after the cutover. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4951/ Sample changed pages: |
…w by @infra-vault-gh-plugin-prod) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…iew by @infra-vault-gh-plugin-prod) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… by @infra-vault-gh-plugin-prod) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… differ (per review by @infra-vault-gh-plugin-prod) Co-Authored-By: Claude Opus 5.5 <[email protected]>
The CloudFront function redirects /docs/api/doc/* (elastic/docs-eng-team#1213), so docs-builder serve does not need its own redirect. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Why
/docsegment before the cutover (elastic/docs-eng-team#725), so readers see one URL change, not two./doclinks must keep working for readers and authors.Closes elastic/docs-eng-team#1211
What
links.jsonroots, search documents andllms.txtuse/docs/api/<key>/..../docform. This covers www.elastic.co from isolated builds, and any assembler environment without theassembler-api-explorerflag (prod today). Prod output does not change./doclinks stay valid. The link check accepts them in content and in OpenAPI descriptions. Olderlinks.jsonfiles withapi/doc/...roots still resolve./doccontent link gets a new hint,ApiLinkLegacyPrefix, which names the page's URL after the cutover. You can suppress it like the other hints.Notes
ApiUrlBuilder.ProductRootdoes not read the flag. A build with the flag off renders no API pages, so a flag branch there would never run. The flag decides only how links to prod are written:IUriEnvironmentResolver.LegacyApiUrls, applied once inCrossLinkResolver. All bump.sh-era URL knowledge lives inApiLegacyRedirects, which is already slated for deletion./docs/api/doc/*URLs redirect only at the edge, through the CloudFront function from elastic/docs-eng-team#1213.docs-builder servehas no such redirect. Staging, edge and preview need Bump eslint from 9.25.1 to 9.26.0 in /src/Elastic.Markdown #1213. Enable Bump eslint from 9.25.1 to 9.26.0 in /src/Elastic.Markdown #1213 on those environments before or with this deploy. At the cutover (Initial v0 of docs-assembler repos build-all command. #725), flip prod'sassembler-api-explorerflag andIsolatedBuildEnvironmentUriResolver.LegacyApiUrlstogether. A test fails if those two disagree.main, it rewrites 169 files. Running it on this branch changes nothing. The files it excludes keep the legacy form on purpose, and I edited them by hand: the legacy helpers inApiLegacyRedirects,ApiLinkCheck,FloatingLinkSection, the two URI resolvers, the legacy-input tests and the docs about legacy links. The frontend parsersapi-tree.tsandapi-navigation.tswere also edited by hand.Codemod
Verify
🤖 Generated with Claude Code