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

github.com/syui/hugo-theme-air.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyui <syui@syui.cf>2019-08-16 16:32:11 +0300
committersyui <syui@syui.cf>2019-08-18 14:10:13 +0300
commit3bc80b59277875465b804afe4a6f63fa88caf628 (patch)
tree60cf772ad2f0b936777af9932c04925a7d41f235
parentaa866518d9cd472f118ec8ca5231460a3704fede (diff)
fix issues-682 gohugoio/hugoThemes
fix config
-rw-r--r--config.toml1
-rw-r--r--layouts/_default/list.html7
-rw-r--r--layouts/index.html8
3 files changed, 14 insertions, 2 deletions
diff --git a/config.toml b/config.toml
index 198b1be..789ac21 100644
--- a/config.toml
+++ b/config.toml
@@ -24,3 +24,4 @@ canonifyurls = true
twitterName = ""
# set true if you are not proud of using Hugo (true will hide the footer note "Proudly published with HUGO.....")
hideHUGOSupport = false
+ mainSections = ["post"]
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index e9e2e61..e420985 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -35,7 +35,14 @@
</header>
<main id="content" class="content" role="main">
+ {{ $pages := .Pages }}
+ {{ if .IsHome }}
+ {{ $pages = .Site.RegularPages }}
+ {{ end }}
+ {{ $paginator := .Paginate $pages }}
+ <!--
{{ $paginator := .Paginator }}
+ -->
<div class="extra-pagination inner">
{{ partial "pagination.html" $paginator }}
diff --git a/layouts/index.html b/layouts/index.html
index e33de31..220ad94 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -36,8 +36,12 @@
</header>
<main id="content" class="content" role="main">
-
- {{ $paginator := .Paginate (where .Data.Pages "Section" "post") }}
+ {{ $pages := .Pages }}
+ {{ if .IsHome }}
+ {{ $pages = .Site.RegularPages }}
+ {{ end }}
+ {{ $paginator := .Paginate $pages }}
+ <!--{{ $paginator := .Paginate (where .Data.Pages "Section" "post") }}-->
<div class="extra-pagination inner">
{{ partial "pagination.html" $paginator }}