diff options
author | syui <syui@syui.cf> | 2019-08-16 16:32:11 +0300 |
---|---|---|
committer | syui <syui@syui.cf> | 2019-08-18 14:10:13 +0300 |
commit | 3bc80b59277875465b804afe4a6f63fa88caf628 (patch) | |
tree | 60cf772ad2f0b936777af9932c04925a7d41f235 | |
parent | aa866518d9cd472f118ec8ca5231460a3704fede (diff) |
fix issues-682 gohugoio/hugoThemes
fix config
-rw-r--r-- | config.toml | 1 | ||||
-rw-r--r-- | layouts/_default/list.html | 7 | ||||
-rw-r--r-- | layouts/index.html | 8 |
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 }} |