Skip to content

Commit

Permalink
docs: add instruction for using markdown in tabs (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
imfing authored Sep 13, 2023
1 parent 4553a8e commit 4a9a285
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions exampleSite/content/docs/guide/shortcodes/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,44 @@ The `YAML` tab will be selected by default.
{{< tab >}}**TOML**: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.{{< /tab >}}

{{< /tabs >}}


### Use Markdown

Markdown syntax including code block is also supported:

````
{{</* tabs items="JSON,YAML,TOML" */>}}
{{</* tab */>}}
```json
{ "hello": "world" }
```
{{</* /tab */>}}
... add other tabs similarly
{{</* /tabs */>}}
````

{{< tabs items="JSON,YAML,TOML" >}}

{{< tab >}}
```json
{ "hello": "world" }
```
{{< /tab >}}

{{< tab >}}
```yaml
hello: world
```
{{< /tab >}}

{{< tab >}}
```toml
hello = "world"
```
{{< /tab >}}

{{< /tabs >}}

0 comments on commit 4a9a285

Please sign in to comment.