From 779e5d830b01aff47a0e2774602d6cd2482e9202 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sun, 10 Sep 2017 17:02:26 +0100 Subject: [PATCH] Improve archetypes (#265) * Support Hugo 0.24+ in default and home types * Comment and tidy --- archetypes/default.md | 15 +++++++++++++++ archetypes/home.md | 3 +++ archetypes/post.md | 11 +++++++---- archetypes/project.md | 6 ++++-- archetypes/publication.md | 6 ++++-- archetypes/talk.md | 6 ++++-- 6 files changed, 37 insertions(+), 10 deletions(-) diff --git a/archetypes/default.md b/archetypes/default.md index ac36e062..1576d28a 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,2 +1,17 @@ +++ +title = "{{ replace .TranslationBaseName "-" " " | title }}" +date = {{ .Date }} +draft = false + +# Tags and categories +# For example, use `tags = []` for no tags, or the form `tags = ["A Tag", "Another Tag"]` for one or more tags. +tags = [] +categories = [] + +# Featured image +# Place your image in the `static/img/` folder and reference its filename below, e.g. `image = "example.jpg"`. +[header] +image = "" +caption = "" + +++ diff --git a/archetypes/home.md b/archetypes/home.md index 07430b3d..9edde2cd 100644 --- a/archetypes/home.md +++ b/archetypes/home.md @@ -1,4 +1,7 @@ +++ +date = {{ .Date }} +draft = true + subtitle = "" # Order that this section will appear in. diff --git a/archetypes/post.md b/archetypes/post.md index ec870d98..1576d28a 100644 --- a/archetypes/post.md +++ b/archetypes/post.md @@ -1,12 +1,15 @@ +++ title = "{{ replace .TranslationBaseName "-" " " | title }}" -date = "{{ .Date }}" +date = {{ .Date }} +draft = false -math = false -highlight = true +# Tags and categories +# For example, use `tags = []` for no tags, or the form `tags = ["A Tag", "Another Tag"]` for one or more tags. tags = [] +categories = [] -# Optional featured image (relative to `static/img/` folder). +# Featured image +# Place your image in the `static/img/` folder and reference its filename below, e.g. `image = "example.jpg"`. [header] image = "" caption = "" diff --git a/archetypes/project.md b/archetypes/project.md index 559ab497..69cef17e 100644 --- a/archetypes/project.md +++ b/archetypes/project.md @@ -1,6 +1,7 @@ +++ title = "{{ replace .TranslationBaseName "-" " " | title }}" -date = "{{ .Date }}" +date = {{ .Date }} +draft = false # Tags: can be used for filtering projects. # Example: `tags = ["machine-learning", "deep-learning"]` @@ -21,7 +22,8 @@ math = false # Does the project detail page use source code highlighting? highlight = true -# Optional featured image (relative to `static/img/` folder). +# Featured image +# Place your image in the `static/img/` folder and reference its filename below, e.g. `image = "example.jpg"`. [header] image = "" caption = "" diff --git a/archetypes/publication.md b/archetypes/publication.md index bfea37ab..2a480e8b 100644 --- a/archetypes/publication.md +++ b/archetypes/publication.md @@ -1,6 +1,7 @@ +++ title = "{{ replace .TranslationBaseName "-" " " | title }}" -date = "{{ .Date }}" +date = {{ .Date }} +draft = false # Authors. Comma separated list, e.g. `["Bob Smith", "David Jones"]`. authors = [""] @@ -44,7 +45,8 @@ url_project = "" url_slides = "" url_video = "" -# Optional featured image (relative to `static/img/` folder). +# Featured image +# Place your image in the `static/img/` folder and reference its filename below, e.g. `image = "example.jpg"`. [header] image = "" caption = "" diff --git a/archetypes/talk.md b/archetypes/talk.md index 98d1ed77..24ae5bce 100644 --- a/archetypes/talk.md +++ b/archetypes/talk.md @@ -1,6 +1,7 @@ +++ title = "{{ replace .TranslationBaseName "-" " " | title }}" -date = "{{ .Date }}" +date = {{ .Date }} +draft = false abstract = "" abstract_short = "" @@ -16,7 +17,8 @@ url_pdf = "" url_slides = "" url_video = "" -# Optional featured image (relative to `static/img/` folder). +# Featured image +# Place your image in the `static/img/` folder and reference its filename below, e.g. `image = "example.jpg"`. [header] image = "" caption = ""