Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/reuixiy/hugo-theme-meme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorreuixiy <reuixiy@gmail.com>2020-06-24 16:43:06 +0300
committerreuixiy <reuixiy@gmail.com>2020-06-24 16:43:06 +0300
commitf1e35035e0b92d80881743adbbfa523839e27019 (patch)
tree773b3d1e5f71b53b2a414dea1d11da8c9f2f0503
parentaf125a1302295f9b1cd9e65a798aca8e8ceef6e9 (diff)
feat: support hugo v0.73.0
closes #207 BREAKING CHANGE: MemE now requires Hugo v0.73.0+.
-rw-r--r--config-examples/en/config.toml5
-rw-r--r--config-examples/zh-cn/config.toml5
-rw-r--r--layouts/_default/list.html6
-rw-r--r--layouts/partials/utils/title.html4
-rw-r--r--theme.toml2
5 files changed, 7 insertions, 15 deletions
diff --git a/config-examples/en/config.toml b/config-examples/en/config.toml
index b188f80..12324b2 100644
--- a/config-examples/en/config.toml
+++ b/config-examples/en/config.toml
@@ -146,11 +146,8 @@ uglyURLs = false
page = ["HTML"]
home = ["HTML", "SectionsAtom", "SectionsRSS", "SearchIndex"]
section = ["HTML"]
- # Taxonomy
- taxonomyTerm = ["HTML"]
- # Taxonomy term
taxonomy = ["HTML"]
- # Note: https://github.com/gohugoio/hugo/issues/4528#issuecomment-508488859
+ term = ["HTML"]
# Maximum number of items in the Atom & RSS feed
[services.rss]
diff --git a/config-examples/zh-cn/config.toml b/config-examples/zh-cn/config.toml
index db51422..ec4dd54 100644
--- a/config-examples/zh-cn/config.toml
+++ b/config-examples/zh-cn/config.toml
@@ -145,11 +145,8 @@ uglyURLs = false
# home = ["HTML", "SectionsAtom", "SectionsRSS", "SearchIndex"]
home = ["HTML", "SectionsAtom", "SectionsRSS"]
section = ["HTML"]
- # 类别
- taxonomyTerm = ["HTML"]
- # 类别项
taxonomy = ["HTML"]
- # 说明:https://github.com/gohugoio/hugo/issues/4528#issuecomment-508488859
+ term = ["HTML"]
# RSS & Atom 文章数限制
[services.rss]
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index bd90eb2..f294c2d 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -9,7 +9,7 @@
{{ if (eq .Kind "section") }}
<h1 class="list-title">{{ .Title | default (delimit (last 1 (split (strings.TrimSuffix "/_index.md" .Path) "/")) " ") }}</h1>
{{ end }}
- {{ if (eq .Kind "taxonomy") }}
+ {{ if (eq .Kind "term") }}
<h1 class="list-title">{{ .Title | default .Data.Term | default (delimit (last 1 (split (strings.TrimSuffix "/_index.md" .Path) "/")) " ") }}</h1>
{{ end }}
{{ end }}
@@ -34,11 +34,9 @@
{{ end }}
<!-- Taxonomy (See `taxonomy` folder) -->
- <!-- Note: Taxonomy’s Page Kind is `taxonomyTerm`; -->
- <!-- Taxonomy Term’s Page Kind is `taxonomy` -->
<!-- Taxonomy Term -->
- {{ if (eq .Kind "taxonomy") }}
+ {{ if (eq .Kind "term") }}
{{ $pages := .Pages }}
{{ $.Scratch.Set "pages" $pages }}
{{ end }}
diff --git a/layouts/partials/utils/title.html b/layouts/partials/utils/title.html
index 890161f..be08c99 100644
--- a/layouts/partials/utils/title.html
+++ b/layouts/partials/utils/title.html
@@ -4,10 +4,10 @@
{{- if eq $.Kind "home" -}}
{{- $htmlTitle = $htmlTitle | default $.Site.Title -}}
<!-- Taxonomy -->
-{{- else if eq $.Kind "taxonomyTerm" -}}
+{{- else if eq $.Kind "taxonomy" -}}
{{- $htmlTitle = $htmlTitle | default ($.Type | title) -}}
<!-- Taxonomy Term -->
-{{- else if eq $.Kind "taxonomy" -}}
+{{- else if eq $.Kind "term" -}}
{{- $taxonomyTermTitle := $htmlTitle | default $.Data.Term | default (delimit (last 1 (split (strings.TrimSuffix "/_index.md" $.Path) "/")) " ") -}}
{{- with $.Site.GetPage (printf "/%s" $.Data.Plural) -}}
{{- $htmlTitle = printf "%s: %s" (.Title | default (.Type | title)) $taxonomyTermTitle -}}
diff --git a/theme.toml b/theme.toml
index 982afee..7e2e11a 100644
--- a/theme.toml
+++ b/theme.toml
@@ -8,7 +8,7 @@ description = "MemE is a powerful and highly customizable GoHugo theme for perso
homepage = "https://github.com/reuixiy/hugo-theme-meme/"
tags = ["Blog", "Minimal", "Clean", "Typography", "Multilingual"]
features = ["Dark Mode", "MathJax", "KaTeX", "JSON-LD", "Drop Cap", "PWA", "TOC"]
-min_version = "0.62.2"
+min_version = "0.73.0"
[author]
name = "reuixiy"