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

github.com/hauke96/hugo-theme-hamburg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Stieler <mail@hauke-stieler.de>2019-08-20 02:53:17 +0300
committerHauke Stieler <mail@hauke-stieler.de>2019-08-20 02:54:48 +0300
commitd5e4e2fea09a70e106f247a5e01f87a54de495eb (patch)
tree6ebe6d0fe19ebdb74d5e10e435dad73f015a76c3
parentc8ee93c6742fb65140aba5a6ea91ab2267741198 (diff)
Make theme compatible with hugo v0.57
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/_default/list.html2
-rw-r--r--layouts/_default/taxonomy.html2
-rw-r--r--layouts/_default/terms.html2
-rw-r--r--layouts/index.html2
-rw-r--r--theme.toml1
6 files changed, 6 insertions, 4 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 11802d8..5c8ab46 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -14,3 +14,4 @@ theme = "hamburg"
[params]
subtitle = "The great example site of the hugo-hamburg-theme"
+ mainSections = ["posts"]
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 9ae4d8d..05fbe39 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,7 +1,7 @@
{{ partial "header.html" . }}
<section class="article-list">
<h1>{{ .Title }}</h1>
- {{ range .Data.Pages }}
+ {{ range .Pages }}
<div class="delimiter"></div>
{{ .Render "li" }}
{{ end }}
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
index 3fdea4d..e7b1998 100644
--- a/layouts/_default/taxonomy.html
+++ b/layouts/_default/taxonomy.html
@@ -6,7 +6,7 @@
{{ i18n "allTags" }}
</a>
</div>
- {{ range .Data.Pages }}
+ {{ range .Pages }}
<div class="delimiter"></div>
{{ .Render "li" }}
{{ end }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index a4d5a24..801323a 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -3,7 +3,7 @@
<h1>{{ .Title }}</h1>
{{ $data := .Data }}
<div class="list-group">
- {{ range $key, $value := .Data.Pages }}
+ {{ range $key, $value := .Pages }}
<a class="list-group-item" href="{{ $value.URL }}">
{{ $value.Name }}
</a>
diff --git a/layouts/index.html b/layouts/index.html
index cf1dd7c..f24966c 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,6 +1,6 @@
{{ partial "header.html" . }}
<div class="article-list">
- {{ range $index, $page := where .Data.Pages "Type" "posts" }}
+ {{ range $index, $page := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ if ne $index 0 }}
<div class="delimiter"></div>
{{ end }}
diff --git a/theme.toml b/theme.toml
index 5992857..10502cd 100644
--- a/theme.toml
+++ b/theme.toml
@@ -5,6 +5,7 @@ description = "Simple and clean blog theme for hugo"
homepage = "https://github.com/hauke96/hugo-theme-hamburg"
tags = ["blog", "tags", "bootstrap", "multilingual", "clean", "minimal", "disqus", "font awesome", "mobile"]
repo = "https://github.com/hauke96/hugo-theme-hamburg"
+min_version = "0.57"
[author]
name = "Hauke Stieler"