According to Docsy documentation here
If your content is markdown, use the percent sign % as outermost delimiter of your tab shortcode, your markup should look like {{% tab %}}Your markdown content{{% /tab %}}. In case of HTML content, use square brackets <> as outermost delimiters: {{< tab >}}Your HTML content{{< /tab >}}.
As my tab content has markdown code that I need rendered, I'm using % as delimiter. But is not working, as it is rendering me the content as code block, which I understand is the default unless otherwise specified.
I tried:
{{% tabpane %}} {{% tab header="Tab 1 name" %}} markdown content for tab 1 {{% /tab %}} {{% tab header="tab 2 name" %}} Markdown content for tab 2 {{% /tab %}} {{% /tabpane %}}
And it did not work:
Using % as delimiter
So I tried HTML delimiter to check if delimiter parameter functionality was working at all and it kinda worked:
{{< tabpane >}} {{< tab header="Tab 1 name" >}} markdown content for tab 1 {{< /tab >}} {{< tab header="tab 2 name" >}} Markdown content for tab 2 {{< /tab >}} {{< /tabpane >}}
It renders the content as HTML! So the feature seems to be working, just not for markdown content. This is my code: My code on VSC
I'm using VSC, and previewing changes on localhost with Hugo. I would be really thankful if someone could help me figure out what is happening here, that is, what I'm doing wrong. Thank you!
EDIT:
Specifying
lang="markdown"
in tabpane seems to helpe, butnot quite, as it renders markdown, but it still shows de special characters used in markdown (e.g. the ** to get bold letters) For bash it works, as long as bash command is the only content of tab. Once you add text before or after command it breaks.