pskordilakis/vuepress-tabs

Customise fragment ID

Closed this issue · 2 comments

jloh commented

I've had a poke around the code but I can't seem to find a way to customise the fragment.

I was hoping you could do something like this:

::: tab :id="custom-fragment" Tab 1
Tab contents
:::

Am I doing something wrong or is it not possible at this stage? Thanks for the great module!

Hi,

I created a new version that lets pass attributes to tab component.

For your example it will be

::: tab id="custom-fragment" "Tab 1"
Tab contents
:::

Tab 1 will be passed as the name attribute so it must be enclosed in quotes,
or you can write it in full form name="Tab 1"

can you test it and tell me if it resolves the issue?

jloh commented

Thanks, works perfectly!