Jelajahi Sumber

Support Hugo v0.24+ (#240)

* Require Hugo v0.24+ to support new archetype system
* Explicitly set `title` and `date` in archetypes
C. Wu 8 tahun lalu
induk
melakukan
4859cbe36a
5 mengubah file dengan 12 tambahan dan 2 penghapusan
  1. 3 0
      archetypes/post.md
  2. 3 0
      archetypes/project.md
  3. 2 0
      archetypes/publication.md
  4. 3 1
      archetypes/talk.md
  5. 1 1
      theme.toml

+ 3 - 0
archetypes/post.md

@@ -1,4 +1,7 @@
 +++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = "{{ .Date }}"
+
 math = false
 highlight = true
 tags = []

+ 3 - 0
archetypes/project.md

@@ -1,4 +1,7 @@
 +++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = "{{ .Date }}"
+
 # Tags: can be used for filtering projects.
 # Example: `tags = ["machine-learning", "deep-learning"]`
 tags = []

+ 2 - 0
archetypes/publication.md

@@ -1,4 +1,6 @@
 +++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = "{{ .Date }}"
 
 # Authors. Comma separated list, e.g. `["Bob Smith", "David Jones"]`.
 authors = [""]

+ 3 - 1
archetypes/talk.md

@@ -1,5 +1,7 @@
 +++
-title = ""
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = "{{ .Date }}"
+
 abstract = ""
 abstract_short = ""
 event = ""

+ 1 - 1
theme.toml

@@ -3,7 +3,7 @@ license = "MIT"
 licenselink = "https://github.com/gcushen/hugo-academic/blob/master/LICENSE.md"
 description = "Easily create beautifully simple academic or personal sites"
 homepage = "https://github.com/gcushen/hugo-academic"
-min_version = 0.18
+min_version = 0.24
 tags = ["academic",
         "portfolio",
         "responsive",