You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a docs page moves, scripts/make-s3-redirects.js creates S3 WebsiteRedirectLocation objects for the old URLs, including .md duplicates for markdown clients (the mdRedirects loop, lines 16–25). Those .md redirects point at the HTML URL of the new page rather than its markdown artifact, so a header-free markdown client (the .md URL-suffix convention, e.g. the Pulumi CLI docs fetcher) that follows the redirect lands on HTML.
Header-based negotiation is unaffected: a client sending Accept: text/markdown keeps the header across the 301 and the destination negotiates correctly (verified: ends in 200 text/markdown). Only .md-suffix clients are impacted. Agent-readiness checkers that probe with the Accept header (e.g. Cloudflare's) are not affected either.
In the mdRedirects loop in scripts/make-s3-redirects.js: when duplicating a docs/**/*.html redirect to its .md key, rewrite the location to the markdown artifact (<target>index.md) whenever the target is a site-relative page URL (starts with /, ends with /). Leave external/absolute targets untouched.
While in there, consider widening the loop's key.startsWith("docs/") restriction to the sections that gain markdown artifacts in #20593 (what-is/, product/, pricing/, and the top-level aliases like get-started/ that target markdown-enabled pages), so moved pages in those sections get markdown-preserving .md redirects too.
Problem
When a docs page moves,
scripts/make-s3-redirects.jscreates S3WebsiteRedirectLocationobjects for the old URLs, including.mdduplicates for markdown clients (themdRedirectsloop, lines 16–25). Those.mdredirects point at the HTML URL of the new page rather than its markdown artifact, so a header-free markdown client (the.mdURL-suffix convention, e.g. the Pulumi CLI docs fetcher) that follows the redirect lands on HTML.Repro (production, 2026-07-30)
The correct target already exists and serves markdown:
Scope notes
Accept: text/markdownkeeps the header across the 301 and the destination negotiates correctly (verified: ends in200 text/markdown). Only.md-suffix clients are impacted. Agent-readiness checkers that probe with the Accept header (e.g. Cloudflare's) are not affected either./what-is/,/product/, and/pricing/.Suggested fix
In the
mdRedirectsloop inscripts/make-s3-redirects.js: when duplicating adocs/**/*.htmlredirect to its.mdkey, rewrite the location to the markdown artifact (<target>index.md) whenever the target is a site-relative page URL (starts with/, ends with/). Leave external/absolute targets untouched.While in there, consider widening the loop's
key.startsWith("docs/")restriction to the sections that gain markdown artifacts in #20593 (what-is/,product/,pricing/, and the top-level aliases likeget-started/that target markdown-enabled pages), so moved pages in those sections get markdown-preserving.mdredirects too.