Эх сурвалжийг харах

Improve archetypes (#265)

* Support Hugo 0.24+ in default and home types
* Comment and tidy
George Cushen 8 жил өмнө
parent
commit
779e5d830b

+ 15 - 0
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 = ""
+
 +++

+ 3 - 0
archetypes/home.md

@@ -1,4 +1,7 @@
 +++
+date = {{ .Date }}
+draft = true
+
 subtitle = ""
 
 # Order that this section will appear in.

+ 7 - 4
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 = ""

+ 4 - 2
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 = ""

+ 4 - 2
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 = ""

+ 4 - 2
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 = ""