Question: Where does the switcher
in code block markdown come from
#84415
Unanswered
hieucchu-eh
asked this question in
Help
Replies: 3 comments 1 reply
-
cc @delbaoliveira if you have any insight (sr for pinging, i notice you contribute to the docs folder) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi, that one is custom made. More stablished solutions out there may use this https://vitepress.dev/guide/markdown#code-groups, or something like Fumadocs does, https://fumadocs.dev/blog/v15#code-block-tabs |
Beta Was this translation helpful? Give feedback.
0 replies
-
oh tks, do u what should i be looking at to write my custom one, is it rehype? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I see in nextjs docs they have a modifier syntax called
switcher
that applies to code block to generate the language dropdownnext.js/docs/01-app/01-getting-started/01-installation.mdx
Lines 156 to 166 in bd727d6
Where does this come from. I have tried to search through shiki, rehype, fumadocs mdx related stuff but cant find any reference to this. Can anyone enlighten me 🙏
https://nextjs.org/docs/app/getting-started/installation#create-the-app-directory
https://nextjs.org/docs/community/contribution-guide#code-blocks
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions