From b04437c180886e9eb480ef9774ad0544246bfd6a Mon Sep 17 00:00:00 2001 From: razonyang Date: Fri, 9 Sep 2022 21:05:41 +0800 Subject: [PATCH] docs: update Content pages --- exampleSite/content/docs/content/index.md | 16 ++++++++++++++++ .../content/docs/content/index.zh-hans.md | 16 ++++++++++++++++ .../content/docs/content/index.zh-hant.md | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/exampleSite/content/docs/content/index.md b/exampleSite/content/docs/content/index.md index 08f3562a4..8719ca2ef 100644 --- a/exampleSite/content/docs/content/index.md +++ b/exampleSite/content/docs/content/index.md @@ -38,6 +38,22 @@ mainSections = ["blog", "posts", "docs", "notes"] Front Matter is the place where we put page metadata and parameters, such as title, date and so on. +### Formats + +Hugo supports three formats of front matter: `YAML`, `TOML` and `JSON`. + +- `TOML`: identified by opening and closing `+++`. +- `YAML`: identified by opening and closing `---`. +- `JSON`: a single JSON object surrounded by `{` and `}`, followed by a new line. + +Let's take `TOML` as an example: + +```toml ++++ +title = 'Hello world!' ++++ +``` + See also [Page Parameters]({{< ref "docs/configuration/page-params" >}}) and [Hugo Front Matter](https://gohugo.io/content-management/front-matter). ## Content Types diff --git a/exampleSite/content/docs/content/index.zh-hans.md b/exampleSite/content/docs/content/index.zh-hans.md index 58f874482..228f8db62 100644 --- a/exampleSite/content/docs/content/index.zh-hans.md +++ b/exampleSite/content/docs/content/index.zh-hans.md @@ -38,6 +38,22 @@ mainSections = ["blog", "posts", "docs", "notes"] Front Matter is the place where we put page metadata and parameters, such as title, date and so on. +### Formats + +Hugo supports three formats of front matter: `YAML`, `TOML` and `JSON`. + +- `TOML`: identified by opening and closing `+++`. +- `YAML`: identified by opening and closing `---`. +- `JSON`: a single JSON object surrounded by `{` and `}`, followed by a new line. + +Let's take `TOML` as an example: + +```toml ++++ +title = 'Hello world!' ++++ +``` + See also [Page Parameters]({{< ref "docs/configuration/page-params" >}}) and [Hugo Front Matter](https://gohugo.io/content-management/front-matter). ## 内容类型 diff --git a/exampleSite/content/docs/content/index.zh-hant.md b/exampleSite/content/docs/content/index.zh-hant.md index 19475c78e..b679ffec5 100644 --- a/exampleSite/content/docs/content/index.zh-hant.md +++ b/exampleSite/content/docs/content/index.zh-hant.md @@ -38,6 +38,22 @@ mainSections = ["blog", "posts", "docs", "notes"] Front Matter is the place where we put page metadata and parameters, such as title, date and so on. +### Formats + +Hugo supports three formats of front matter: `YAML`, `TOML` and `JSON`. + +- `TOML`: identified by opening and closing `+++`. +- `YAML`: identified by opening and closing `---`. +- `JSON`: a single JSON object surrounded by `{` and `}`, followed by a new line. + +Let's take `TOML` as an example: + +```toml ++++ +title = 'Hello world!' ++++ +``` + See also [Page Parameters]({{< ref "docs/configuration/page-params" >}}) and [Hugo Front Matter](https://gohugo.io/content-management/front-matter). ## 內容類型