Skip to content

[Chore] Simplify logic around tags#30892

Open
kodster28 wants to merge 6 commits into
productionfrom
remove-tags2
Open

[Chore] Simplify logic around tags#30892
kodster28 wants to merge 6 commits into
productionfrom
remove-tags2

Conversation

@kodster28
Copy link
Copy Markdown
Collaborator

Summary

Clean up some of the unused, overly heavyweight logic we have running behind the scenes of our docs site.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
* @cloudflare/product-owners
/.github/CODEOWNERS @cloudflare/product-owners, @cloudflare/content-engineering, @kodster28
*.ts @cloudflare/content-engineering, @kodster28
*.astro @cloudflare/content-engineering, @kodster28
/src/content/docs/pages/framework-guides/ @cloudflare/wrangler, @aninibread, @GregBrimble, @cloudflare/product-owners, @MattieTK
/src/content/docs/rules/ @pedrosousa, @cloudflare/appsec-reviewers, @elithrar, @cloudflare/product-owners
/src/content/docs/style-guide/ @dcpena, @caley-b, @cloudflare/product-owners
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/product-owners, @cloudflare/wrangler, @MattieTK, @cloudflare/dev-plat-leads

@ask-bonk ask-bonk Bot added engineering Problems or updates to developers.cloudflare.com website docs engine Requires a change to the docs engine labels May 18, 2026
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues need fixing before merge.

CRITICAL

  • src/content/docs/style-guide/frontmatter/tags.mdx imports and renders <TagsUsage />, which was deleted in this PR. This will break the build. The page also references the deleted /src/schemas/tags.ts. This page should be rewritten or removed.

HIGH

  • src/content/docs/style-guide/components/resources-by-selector.mdx was updated to change the filterables example, but lines 12 and 34–44 still document the deleted tags prop and filterables={["tags"]}. Clean up the rest of this page.
  • src/content/docs/style-guide/components/external-resources.mdx links to /style-guide/frontmatter/tags/ for a canonical tag list, but that page's allowlist visualization was removed. Remove or update this link.

MEDIUM

  • src/content/docs/style-guide/components/index.mdx describes ResourcesBySelector as filtering "based on tags and content type" — update to "content type and products".

directory="workers/examples/"
types={["example"]}
filterables={["tags"]}
filterables={["products"]}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example was updated, but the rest of this file still references the deleted tags prop and filterables={["tags"]} (lines 12 and 34–44). Please clean those up too.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 18, 2026

I’ve completed the review of PR #30892 and posted a review comment with inline feedback.

Summary of changes

This PR removes the tag allowlist and enforcement infrastructure from the docs site:

  • Deletes src/schemas/tags.ts, src/plugins/starlight/route-data.ts, and src/components/TagsUsage.astro
  • Removes tags prop/filtering from ResourcesBySelector.astro and drops pcx_tags meta tags from Head.astro
  • Cleans up astro.config.ts (removes the routeMiddleware and ?tags=* prerender exclusion)
  • Updates product pages and reusable components that previously relied on tag-based filtering
  • Syncs agent references (.agents/references/components.md, .agents/references/style-guide.md, AGENTS.md) to remove tag documentation

Labels applied

  • engineering
  • docs engine

Issues flagged

CRITICAL

  • src/content/docs/style-guide/frontmatter/tags.mdx imports and renders <TagsUsage />, which was deleted in this PR. It also references the deleted /src/schemas/tags.ts. This will break the build and needs to be rewritten or removed.

HIGH

  • src/content/docs/style-guide/components/resources-by-selector.mdx was partially updated (the filterables example now uses ["products"]), but lines 12 and 34–44 still document the deleted tags prop and filterables={["tags"]}.
  • src/content/docs/style-guide/components/external-resources.mdx links to /style-guide/frontmatter/tags/ for a canonical tag list. Because the allowlist and TagsUsage visualization were removed, that link is now misleading.

MEDIUM

  • src/content/docs/style-guide/components/index.mdx describes ResourcesBySelector as filtering “based on tags and content type” — this should be updated to “content type and products.”

I posted these findings as a PR review (with an inline comment on the one changed line I could target directly; the remaining issues are in unchanged files that are now stale due to the deletions in this PR).

github run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

This PR requires additional review attention because it affects the following areas:

Redirects

This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:

  • /style-guide/frontmatter/tags/

@kodster28 kodster28 changed the title [Chore] Site cleanup [Chore] Simplify logic around tags May 18, 2026
@kodster28
Copy link
Copy Markdown
Collaborator Author

/bonk re-review based on the latest changes

@kodster28 kodster28 marked this pull request as ready for review May 18, 2026 19:23
@kodster28 kodster28 requested review from a team, GregBrimble, MattieTK and aninibread as code owners May 18, 2026 19:23
Co-authored-by: kodster28 <kodster28@users.noreply.github.com>
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 18, 2026

Fixed 4 remaining stale references to the deleted tag filtering functionality:

  • src/content/docs/style-guide/components/resources-by-selector.mdx line 12 — Removed tags from the intro sentence.
  • src/content/docs/style-guide/components/resources-by-selector.mdx line 34 — Updated the filterables example from ["tags"] to ["products"].
  • src/content/docs/style-guide/components/index.mdx line 86 — Updated the ResourcesBySelector description from "based on tags and content type" to "based on content type and products".
  • .agents/references/components.md line 761 — Updated the ResourcesBySelector component reference to remove tags.

The previously flagged CRITICAL and HIGH issues (tags.mdx deletion, external-resources.mdx link removal, and resources-by-selector.mdx tags prop docs removal) were already resolved in the latest changes.

github run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

Preview URL: https://4f0fffe6.preview.developers.cloudflare.com
Preview Branch URL: https://remove-tags2.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/style-guide/frontmatter/tags/ https://remove-tags2.preview.developers.cloudflare.com/style-guide/frontmatter/tags/
https://developers.cloudflare.com/style-guide/components/resources-by-selector/ https://remove-tags2.preview.developers.cloudflare.com/style-guide/components/resources-by-selector/
https://developers.cloudflare.com/pages/framework-guides/deploy-a-hono-site/ https://remove-tags2.preview.developers.cloudflare.com/pages/framework-guides/deploy-a-hono-site/
https://developers.cloudflare.com/pages/framework-guides/deploy-a-nuxt-site/ https://remove-tags2.preview.developers.cloudflare.com/pages/framework-guides/deploy-a-nuxt-site/
https://developers.cloudflare.com/rules/snippets/examples/ https://remove-tags2.preview.developers.cloudflare.com/rules/snippets/examples/
https://developers.cloudflare.com/workers/examples/ https://remove-tags2.preview.developers.cloudflare.com/workers/examples/
https://developers.cloudflare.com/style-guide/components/external-resources/ https://remove-tags2.preview.developers.cloudflare.com/style-guide/components/external-resources/
https://developers.cloudflare.com/rules/examples/ https://remove-tags2.preview.developers.cloudflare.com/rules/examples/
https://developers.cloudflare.com/style-guide/components/ https://remove-tags2.preview.developers.cloudflare.com/style-guide/components/
https://developers.cloudflare.com/rules/transform/examples/ https://remove-tags2.preview.developers.cloudflare.com/rules/transform/examples/
https://developers.cloudflare.com/style-guide/how-we-docs/metadata/ https://remove-tags2.preview.developers.cloudflare.com/style-guide/how-we-docs/metadata/

Comment thread src/content/docs/style-guide/components/index.mdx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs engine Requires a change to the docs engine engineering Problems or updates to developers.cloudflare.com website product:pages product:rules Related to rules product:style-guide product:workers Related to Workers product size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants