Skip to content

feat: serve tag pages at their hierarchy path - #296

Merged
MohamedH1998 merged 6 commits into
fix/api-samplesfrom
feat/api-route-conventions
Oct 25, 2026
Merged

MohamedH1998 merged 6 commits into
fix/api-samplesfrom
feat/api-route-conventions

Conversation

@MohamedH1998

@MohamedH1998 MohamedH1998 commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Opt-in routes.sections: "hierarchical" serves each tag page at the path its tag hierarchy spells, /api/zero-trust/devices/ip-profiles instead of /api/tags/zero-trust-devices-ip-profiles. The default stays byte-identical.

Decision: adopt, and land before the Cloudflare API site goes live, since it moves 1,197 tag URLs. Fourth PR of the stack.

Changes

  • sections: "hierarchical" joins each tag's segment along its parent chain, strips the parent's name from a child that embeds it, and skips page-less grouping tags.
  • tagSegments renames one tag's segment, for a tag whose path would land on a reserved segment.
  • Two tags collapsing to one path, a tag colliding with an operation, a reserved path, an unknown tagSegments key, or tagSegments under the frozen resource-action-v1 convention each fail with the remedy named, including routes.tagSegments when a tag is one side.
  • The routes guide lists every reserved first segment. Changeset is patch: the default is byte-identical, so the stack releases as one patch.

Validation

On the Cloudflare API site Before After
Tag pages at their hierarchy path 0 1,197 of 1,197
Operation URLs moved 0 of 2,974
Site redirects needed 1,257 65
Build with the preview release 51.7 s, 3.60 GB 40.8 s, 3.62 GB
  • Passed: section-route suite, real-build suite with a hierarchical family, config validation; full nimbus-docs suite.
  • Passed: stranger test on a fresh scaffold from the preview release: URLs, coordinates, sidebar, sitemap, dev 404s and every documented error case behave; its two message findings are applied in the last commit.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-api-route-conventions.nimbus-docs.com (commit d2531fd)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://23a57f1d.nimbus-docs.com d2531fd 2026-10-25T09:59:52.774Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://6995d677.nimbus-docs.com 11730f6 2026-10-24T22:59:29.767Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://3e03e38e.nimbus-docs.com b84ed6e 2026-10-24T22:52:12.711Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a801a7db.nimbus-docs.com 361ba94 2026-10-24T22:35:17.772Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://16868832.nimbus-docs.com 796f348 2026-10-24T22:10:24.426Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://35b12c5c.nimbus-docs.com 5ef4cd9 2026-10-24T22:03:47.423Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://8e6d438e.nimbus-docs.com 9369387 2026-10-24T21:50:46.319Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://1dff333c.nimbus-docs.com 3f55334 2026-10-24T21:26:40.195Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://6be1c552.nimbus-docs.com b3d9a9d 2026-10-24T20:57:29.621Z Visit the dashboard ↗

@MohamedH1998 MohamedH1998 changed the title Serve tag pages at their hierarchy path and add a route pattern convention feat: serve tag pages at their hierarchy path and add a route pattern convention Oct 24, 2026
@MohamedH1998
MohamedH1998 force-pushed the feat/api-route-conventions branch from b3d9a9d to 3f55334 Compare October 24, 2026 21:25
An API with nested tags had every section page at tags/<segment>, so a site that publishes landing pages per product and resource could only redirect to them. routes.sections: "hierarchical" routes a tag page at its ancestors' segments then its own, dropping a parent prefix a child tag repeats, and routes.tagSegments renames one tag's segment. Opt-in under resource-action-v2; coordinates and operation URLs do not change.
@MohamedH1998
MohamedH1998 force-pushed the feat/api-route-conventions branch from 3f55334 to 9369387 Compare October 24, 2026 21:49
@MohamedH1998
MohamedH1998 added this pull request to stack #297 October 24, 2026 21:51
@MohamedH1998
MohamedH1998 force-pushed the feat/api-route-conventions branch from 9369387 to 5ef4cd9 Compare October 24, 2026 22:02
@MohamedH1998 MohamedH1998 changed the title feat: serve tag pages at their hierarchy path and add a route pattern convention feat: serve tag pages at their hierarchy path Oct 24, 2026
@MohamedH1998
MohamedH1998 force-pushed the feat/api-route-conventions branch from 5ef4cd9 to 796f348 Compare October 24, 2026 22:09
@MohamedH1998 MohamedH1998 added the pr preview Publish a pkg.pr.new preview for this PR label Oct 24, 2026
@github-actions github-actions Bot removed the pr preview Publish a pkg.pr.new preview for this PR label Oct 24, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
pnpm add https://pkg.pr.new/@cloudflare/create-nimbus-docs@296
pnpm add https://pkg.pr.new/@cloudflare/nimbus-docs@296

commit: 361ba94

A collision between a tag page and another page only suggested renaming or a routes.operations override, which cannot address a tag. The error now also names routes.tagSegments, and the routes guide lists every reserved first segment.
@MohamedH1998 MohamedH1998 added the pr preview Publish a pkg.pr.new preview for this PR label Oct 24, 2026
@github-actions github-actions Bot removed the pr preview Publish a pkg.pr.new preview for this PR label Oct 24, 2026
@MohamedH1998
MohamedH1998 marked this pull request as ready for review October 25, 2026 09:57
@MohamedH1998
MohamedH1998 merged commit c3aa96f into main Oct 25, 2026
56 of 59 checks passed
@MohamedH1998
MohamedH1998 deleted the feat/api-route-conventions branch October 25, 2026 10:50

This branch was successfully deployed

1 active deployment
cloudflare — d2531fd8 Deployed Oct 25, 2026 by MohamedH1998 via Delete closed PR Preview #40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant