標籤頁

範例

JSON: JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax.
YAML: YAML is a human-readable data serialization language.
TOML: TOML aims to be a minimal configuration file format that’s easy to read due to obvious semantics.

使用

預設情況下

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

 {{< tab >}}**JSON**: JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax.{{< /tab */> }}
 {{</* tab >}}**YAML**: YAML is a human-readable data serialization language.{{< /tab >}}
 {{< tab >}}**TOML**: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.{{< /tab >}}

{{< /tabs >}}

指定索引

使用 defaultIndex 屬性指定選定的選項卡。索引從 0 開始。

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

 {{< tab >}}**JSON**: JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax.{{< /tab */> }}
 {{</* tab >}}**YAML**: YAML is a human-readable data serialization language.{{< /tab >}}
 {{< tab >}}**TOML**: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.{{< /tab >}}

{{< /tabs >}}

預設為 YAML

JSON: JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax.
YAML: YAML is a human-readable data serialization language.
TOML: TOML aims to be a minimal configuration file format that’s easy to read due to obvious semantics.

使用 Markdown

也支援包括程式碼區塊的 Markdown 語法:

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

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

 ... add other tabs similarly

{{< /tabs >}}
{ "hello": "world" }
hello: world
hello = "world"