docs: adopt @btravstack/theme npm package (drop jsDelivr pin)#506
Merged
Conversation
Replace the jsDelivr-pinned `custom.css` import with the published `@btravstack/theme` VitePress theme, keeping these docs in visual sync with the landing page and the other btravstack projects through a versioned package instead of a CDN URL pinned to a tag. - docs/.vitepress/theme/index.ts: `export default` the shared theme (which extends VitePress's default theme + layers the design tokens) - remove docs/.vitepress/theme/custom.css (the old jsDelivr @import) - add @btravstack/theme ^1.2.0 to @amqp-contract/docs - exempt @btravstack/theme from the release-age gate (first-party pkg) Verified: vitepress build emits the 1.2.0 tokens (--accent #E0589A, --display-accent #E0589A, --text-accent #D6246F light / #E0589A dark). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the VitePress docs site styling from a jsDelivr-pinned CSS import to the published @btravstack/theme npm package so theme/token updates flow through normal dependency updates and builds remain reproducible.
Changes:
- Switch
docs/.vitepress/theme/index.tsto export the shared@btravstack/themetheme and delete the old CDN-basedcustom.css. - Add
@btravstack/theme@^1.2.0to the docs package and update the lockfile accordingly. - Exempt
@btravstack/themefrom theminimumReleaseAgegate inpnpm-workspace.yaml.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Excludes @btravstack/theme from minimum release age gating. |
| pnpm-lock.yaml | Locks @btravstack/theme@1.2.0 and its VitePress peer resolution. |
| docs/package.json | Adds @btravstack/theme to docs devDependencies. |
| docs/.vitepress/theme/index.ts | Replaces local theme setup with the shared @btravstack/theme export. |
| docs/.vitepress/theme/custom.css | Removes the jsDelivr-pinned CSS import. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
btravers
commented
Jun 28, 2026
Fixes the failing Build check and addresses review feedback. - CI: `vitepress build` failed with `ERR_UNKNOWN_FILE_EXTENSION` on the default theme's `fonts.css`. `@btravstack/theme` imports `vitepress/theme` (side-effect CSS) plus its own `style.css`; VitePress externalized the package during the SSR build, so Node's ESM loader hit the raw `.css`. Add it to `vite.ssr.noExternal` so Vite processes the CSS for the server bundle. - Review: move `@btravstack/theme` into the pnpm catalog as an exact pin (1.2.0) and reference `catalog:` from docs/package.json — single source of truth, consistent with the rest of the workspace. Verified: docs build completes and the 1.2.0 tokens (--accent #E0589A, --text-accent #D6246F) are emitted in the output CSS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Migrates the docs site onto the published
@btravstack/theme@^1.2.0package, replacing the old jsDelivrcustom.cssimport that was pinned to a git tag.What changed
docs/.vitepress/theme/index.tsnowexport defaults the shared theme (it extends VitePress's default theme and layers the btravstack design tokens).docs/.vitepress/theme/custom.css(the@import "https://cdn.jsdelivr.net/.../theme/vitepress.css").@btravstack/theme@^1.2.0to@amqp-contract/docs.@btravstack/themefrom theminimumReleaseAgegate — it's a first-party btravstack package, so the supply-chain maturity delay doesn't apply.Why
A versioned npm dependency replaces a CDN URL pinned to a tag: upstream token/theme changes now arrive via a normal version bump (and Renovate/Changesets), builds are reproducible, and there's no ~12h CDN cache lag or build-time SHA drift.
Verification
vitepress buildemits the 1.2.0 design tokens in the output CSS —--accent #E0589A,--display-accent #E0589A, and--text-accentdarkening to#D6246Fin light mode /#E0589Ain dark (the WCAG-AA fix).🤖 Generated with Claude Code