docs: add instruction for using markdown in tabs (#47)

This commit is contained in:
Xin 2023-09-13 02:54:44 -04:00 committed by GitHub
parent 4553a8eda2
commit 4a9a2850fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 >}} {{< tab >}}**TOML**: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.{{< /tab >}}
{{< /tabs >}} {{< /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 >}}