-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow adding Tabs to showcase different snippets for different programming languages #851
Comments
That's a good feature! and it would be better to just create a Vue component for that. |
Thanks, hope to see this. Vuepress is really awesome! |
I am trying to get the proposed functionality to work, but I am unsure on how to approach this: @ulivz Can you describe how such a Vue component could work and how it would be used inside a Markdown file? |
I recently published docsify-tabs, which is a docsify.js plugin for rendering tabbed content from markdown. I would be happy to port the plugin (or something similar to it) to VuePress if folks are interested. I welcome any feedback prior to beginning the effort such as feature requests, implementation concerns, etc. Thanks! |
@jhildenbiddle Wow, that looks great! Very elegant! It'd be fantastic if you could port it to Vuepress! |
FYI -- I was about to dive into this today, but a quick search on NPM produced this:
Is this sufficient for your needs, @rajaraodv? I'm happy to port docsify-tabs, but I don't want to add more noise into the VuePress plugin ecosystem if the above package adequately handles markdown -> tabs duties. Thx! |
This package only works with VuePress v0.14 (as of vuepress-tabs-0.1.6), but the author is currently porting it to VuePress v1.0.0 (see pskordilakis/vuepress-tabs#6) |
|
FYI: The author of vuepress-tabs ported the project to VuePress>=1.0 and released it as a separate project: https://github.com/pskordilakis/vuepress-plugin-tabs |
This works sufficiently for me at VuePress >= 1.0. The setup steps are straightforward, and the API is clean too. |
The issue with tabs is that each block is independent and for the best experience one should be able to switch one block (for example, a language) and all blocks switch. |
Coming late to the game, and I don't know if you've found a solution yet, @alexeyzimarev but the code-switcher plugin seems to do exactly what you describe 🙂 |
Feature request
In Gitbook, we can add Tabs to showcase different snippets for different programming languages. Further these Tabs are "in-sync" with other Tabs with the same name. For example, if there is are Tabs for "JS", "Java", "Ruby" that shows snippets for Step 1 of something. And then there are another set of Tabs for Step 2, then if the user selects "Ruby" in Step 1, then the "Ruby" tab is auto-selected in the Tabs in Step 2 as well.
Please see the picture from Gitbook for more.
![screen shot 2018-09-17 at 10 06 47 pm](https://user-images.githubusercontent.com/626337/45665614-81df8300-bac6-11e8-93ff-6dc524f21956.png)
What problem does this feature solve?
Helps us showcase multiple code snippets or multiple OS specific instructions.
What does the proposed API look like?
How should this be implemented in your opinion?
Not sure, but I think it should be a simple html markup that should transform to a functioning Tabs.
Are you willing to work on this yourself?**
No
The text was updated successfully, but these errors were encountered: