Make chain & token tables searchable#156
Merged
Merged
Conversation
The supported-chains and supported-tokens tables were imported as MDX components from data/*.md. Vocs' search indexer reads page source and strips imports/components before indexing, so the chain and token names were never indexed — searching "Arbitrum" or "Tempo" returned no result pointing to the supported-chains page. Replace the component imports with @data-start/@Data-end marker comments and add a render-data script that injects the generated markdown directly into the pages between those markers. The content is then literal page text and gets indexed normally; the markers themselves are stripped by the indexer so they stay invisible. The rendered pages are now the committed source of truth, so data/ is a build-time-only artifact and is gitignored. docs-data-updater is unchanged (still emits artifacts to data/); the update-docs-data workflow runs render-data after generating data and commits the rendered pages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mouseless0x
approved these changes
Jun 18, 2026
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.
Problem
Searching a chain name like Arbitrum or Tempo (or a token name) in the docs search bar returned no suggestion pointing to the relevant page.
The supported-chains and supported-tokens tables were imported as MDX components from
data/*.md:Vocs builds its search index from page source and strips imports/components (and
[!include]directives) before extracting text. So the chain and token names — which only existed inside the imported data files — were never indexed.Fix
{/* @data-start: <key> */}…{/* @data-end: <key> */}marker comments in the pages.scripts/render-data.ts(pnpm render-data) which injects the generated markdown fromdata/<key>.mdbetween the matching markers. The content becomes literal page text and is indexed normally; the marker comments are themselves stripped by the indexer, so they stay invisible to readers and search.data/becomes a build-time-only artifact and is gitignored.docs-data-updateris unchanged — it still just emits artifacts todata/. Theupdate-docs-dataworkflow now runsrender-dataafter generating data and commits the rendered pages.Pages affected:
guides/supported-chains(chains + chain-details),references/paymaster/erc20-paymaster/supported-tokens,guides/how-to/erc20-paymaster/supported-tokens.Verification
pnpm search-indexbuilds clean./guides/supported-chains.render-datais idempotent;--checkmode reports staleness for CI.🤖 Generated with Claude Code