Use YAML in archetypes

This commit is contained in:
BBaoVanC 2021-10-16 16:53:01 -05:00
parent cc678c58c1
commit adf5c685be
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
2 changed files with 41 additions and 26 deletions

View File

@ -1,27 +1,34 @@
+++
title = "{{ replace .Name "-" " " | title }}"
date = "{{ .Date | time.Format "2006-01-02" }}"
toc = true
draft = true
---
tags = [
"awesome",
]
title: {{ replace .Name "-" " " | title }}
date: {{ .Date | time.Format "2006-01-02" }}
toc: true
draft: true
# this will be shown for the article in list pages
# currently it can be either an image or video
[[resources]]
name = "feature"
src = "something.webp"
title = "Some image (image format can be anything; webp is just an example)"
+++
tags:
- awesome
This page is about something. All the content before the "more" HTML comment below will become the summary, which will be used in list pages and in the meta tags on the article.
# this will be shown for the article in list pages and in the page metadata
# it can be either an image or video (this might change in the future, however)
resources:
- name: feature
src: something.webp
title: Some image (image format can be anything; webp is just an example)
Or, if you don't want your description to be at the top of the article, you can set your own `description` in the front matter and it will override this. See the [Content Summaries](https://gohugo.io/content-management/summaries/) page on the Hugo docs for more information.
---
This page is about something. All the content before the "more" HTML comment
below will become the summary, which will be used in list pages and in the meta
tags on the article.
Or, if you don't want your description to be at the top of the article, you can
set your own `description` in the front matter and it will override this. See
the [Content Summaries](https://gohugo.io/content-management/summaries/) page on
the Hugo docs for more information.
<!--more-->
## Something
All the content below the "more" HTML comment above is part of the article itself.
All the content below the "more" HTML comment above is part of the article
itself.

View File

@ -1,15 +1,23 @@
+++
title = "{{ replace .Name "-" " " | title }}"
menu = "main"
toc = true
+++
---
This page is about something. All the content before the "more" HTML comment below will become the summary, which will be used in list pages and in the meta tags on the article.
title: {{ replace .Name "-" " " | title }}
menu: main
toc: true
Or, if you don't want your description to be at the top of the article, you can set your own `description` in the front matter and it will override this. See the [Content Summaries](https://gohugo.io/content-management/summaries/) page on the Hugo docs for more information.
---
This page is about something. All the content before the "more" HTML comment
below will become the summary, which will be used in list pages and in the meta
tags on the article.
Or, if you don't want your description to be at the top of the article, you can
set your own `description` in the front matter and it will override this. See
the [Content Summaries](https://gohugo.io/content-management/summaries/) page on
the Hugo docs for more information.
<!--more-->
## Something
All the content below the "more" HTML comment above is part of the article itself.
All the content below the "more" HTML comment above is part of the article
itself.