Skip to content

docs: strip tier badges from llms-txt Markdown twins - #1326

Open
codyjlandstrom wants to merge 1 commit into
mainfrom
claude/keen-chaum-b4a4e4
Open

docs: strip tier badges from llms-txt Markdown twins#1326
codyjlandstrom wants to merge 1 commit into
mainfrom
claude/keen-chaum-b4a4e4

Conversation

@codyjlandstrom

Copy link
Copy Markdown
Contributor

What changed

The Markdown twins generated by @signalwire/docusaurus-plugin-llms-txt concatenated tier badge labels into headings. For example, build/docs/admin/catalog.md opened with # CatalogScaleEnterpriseSelf-Hosted. The badges come from the TiersList component, which renders inside the heading HTML.

This PR adds a rehypeStripTierBadges plugin in docusaurus.config.js. It removes the badge elements (div.TiersList) from the page HTML before it is converted to Markdown. It follows the same dependency-free pattern as the existing rehypeStripHashLinks plugin and is registered next to it in the llms-txt plugin's beforeDefaultRehypePlugins.

Verification

I ran yarn build and compared the headings of all nine affected pages against the previous build output:

  • Page-level headings are clean. # CatalogScaleEnterpriseSelf-Hosted is now # Catalog.
  • Section-level badges are clean too. In reference/okteto-cli.md, ### analyticsPlatformOpen-Source is now ### analytics, and the same applies to self-hosted/manage/air-gapped.md.
  • A grep across all generated twins and llms-full.txt finds no remaining concatenated badge text.
  • Badges only ever appear inside headings, so no page body content was removed.

Known limitation

Link titles in llms.txt itself still contain the badge text, for example - [Catalog ScaleEnterpriseSelf-Hosted](/admin/catalog.md). The plugin extracts each page title from the first h1 of the raw HTML before the configurable rehype pipeline runs, so no config-level plugin can clean it. That fix needs a patch to the plugin (or an upstream change) and is being handled separately.

🤖 Generated with Claude Code

The TiersList badge component renders inside heading HTML, so the
generated Markdown twins concatenated badge labels into heading text
(e.g. `# CatalogScaleEnterpriseSelf-Hosted`). Add a rehype plugin that
removes the badge elements before Markdown conversion, following the
same pattern as rehypeStripHashLinks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Cody Landstrom <cody@okteto.com>
@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for okteto-docs ready!

Name Link
🔨 Latest commit c7fe7b7
🔍 Latest deploy log https://app.netlify.com/projects/okteto-docs/deploys/6a7b386e8f9b3f0008780815
😎 Deploy Preview https://deploy-preview-1326--okteto-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

2 participants