vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.17k stars 923 forks source link

Sync active `CodeGroupItem` across all `CodeGroup`s on same page #541

Closed jrappen closed 10 months ago

jrappen commented 2 years ago

Feature request

Description

When making use of CodeGroupItem for fenced code blocks, I want to sync the active selection across all CodeGroups on the same page.

github-actions[bot] commented 2 years ago

This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 3 days.

jrappen commented 2 years ago

Any updates?

github-actions[bot] commented 2 years ago

This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 3 days.

jrappen commented 2 years ago

@meteorlxy Not sure why your workflow automatically closes issues.

github-actions[bot] commented 2 years ago

This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 3 days.

DaveSanders commented 1 year ago

I'd vote for and like to see this functionality, and support it with an optional cookie. It would be great if when a user switched to a specific language, that all code blocks on the site try to use that language by default.

Mister-Hope commented 1 year ago

This feature is already supported by vuepress-plugin-md-enhance.

Further discussion can be at plugin repo.

meteorlxy commented 1 year ago

I was going to support it in default theme, but it was blocked by https://github.com/vueuse/vueuse/issues/1595 at that time. Now seems that it has been fixed.

Mister-Hope commented 10 months ago

I still recommend to use my plugin https://plugin-md-enhance.vuejs.press/zh/guide/tabs.html

The default theme syntax is a bit complicated and hard to write, also, people may want to associate same id with different tab text