mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 00:16:45 +00:00
Correct front matter example
This commit is contained in:
1 parent
b412fdf65a
commit
8fafca49c4
1 file changed
+10
-10
@@ -109,11 +109,11 @@ hugo new content posts/my-first-post.md
|
|||||||
Hugo created the file in the `content/posts` directory. Open the file with your editor.
|
Hugo created the file in the `content/posts` directory. Open the file with your editor.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
---
|
+++
|
||||||
title: "My First Post"
|
title = 'My First Post'
|
||||||
date: 2022-11-20T09:03:20-08:00
|
date = 2024-01-14T07:07:07+01:00
|
||||||
draft: true
|
draft = true
|
||||||
---
|
+++
|
||||||
```
|
```
|
||||||
|
|
||||||
Notice the `draft` value in the [front matter] is `true`. By default, Hugo does not publish draft content when you build the site. Learn more about [draft, future, and expired content].
|
Notice the `draft` value in the [front matter] is `true`. By default, Hugo does not publish draft content when you build the site. Learn more about [draft, future, and expired content].
|
||||||
@@ -123,11 +123,11 @@ Add some [markdown] to the body of the post, but do not change the `draft` value
|
|||||||
[markdown]: https://commonmark.org/help/
|
[markdown]: https://commonmark.org/help/
|
||||||
|
|
||||||
```text
|
```text
|
||||||
---
|
+++
|
||||||
title: "My First Post"
|
title = 'My First Post'
|
||||||
date: 2022-11-20T09:03:20-08:00
|
date = 2024-01-14T07:07:07+01:00
|
||||||
draft: true
|
draft = true
|
||||||
---
|
+++
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
This is **bold** text, and this is *emphasized* text.
|
This is **bold** text, and this is *emphasized* text.
|
||||||
|
|||||||
Reference in new issue
Block a user