Skip to content

fix(theme): sync package manager code group tabs#862

Merged
yusukebe merged 1 commit into
honojs:mainfrom
L-1ngg:fix/sync-package-manager-code-groups
May 11, 2026
Merged

fix(theme): sync package manager code group tabs#862
yusukebe merged 1 commit into
honojs:mainfrom
L-1ngg:fix/sync-package-manager-code-groups

Conversation

@L-1ngg
Copy link
Copy Markdown
Contributor

@L-1ngg L-1ngg commented May 9, 2026

Summary

Sync package manager code-group tabs across docs pages.

VitePress code groups manage tab state locally, so selecting pnpm or bun in one command group does not update
other package-manager command groups on the same page. This adds a small client-side theme hook that syncs only
package manager tabs: npm, yarn, pnpm, bun, and deno.

Runtime tabs such as Deno, Bun, Node.js, and platform tabs such as Cloudflare Workers are intentionally not
synced.

If a selected package manager tab is not available in another code group, that code group is left unchanged.

Verification

  • bun install --frozen-lockfile
  • bun x prettier --check .vitepress/theme/index.ts .vitepress/theme/use-synced-package-manager-code-groups.ts
  • bun run format
  • bun run build

Copy link
Copy Markdown
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

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

LGTM!

@yusukebe
Copy link
Copy Markdown
Member

Hey @L-1ngg

Awesome! It will be helpful. Thank you for the contribution!

@yusukebe yusukebe merged commit a509fbd into honojs:main May 11, 2026
2 checks passed
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