From adf5c685bed5af6bbd34e915451e24b390922ddb Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sat, 16 Oct 2021 16:53:01 -0500 Subject: [PATCH] Use YAML in archetypes --- archetypes/blog/index.md | 43 +++++++++++++++++++++---------------- archetypes/default/index.md | 24 ++++++++++++++------- 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/archetypes/blog/index.md b/archetypes/blog/index.md index 24b4f21..a596619 100644 --- a/archetypes/blog/index.md +++ b/archetypes/blog/index.md @@ -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. ## 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. diff --git a/archetypes/default/index.md b/archetypes/default/index.md index 40cbff8..71454b4 100644 --- a/archetypes/default/index.md +++ b/archetypes/default/index.md @@ -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. ## 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.