mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-10 10:34:42 -04:00
Correct front matter example
This commit is contained in:
parent
b412fdf65a
commit
8fafca49c4
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user