From 7a5ee0ce2555bc1dca209ae903b86eb7b658cdb6 Mon Sep 17 00:00:00 2001 From: olOwOlo <26087907+olOwOlo@users.noreply.github.com> Date: Wed, 31 Jan 2018 22:19:44 +0800 Subject: [PATCH] refactor: `archive-paginate` rename to `archivePaginate` --- exampleSite/config.toml | 2 +- layouts/_default/section.html | 2 +- layouts/_default/taxonomy.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index cd33aed..cabab6b 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -52,7 +52,7 @@ copyright = "" # default: author.name ↓ # 默认为下面配 description = "Hugo theme even example site." # paginate of archives, tags and categories # 归档、标签、分类每页显示的文章数目,建议修改为一个较大的值 - archive-paginate = 3 + archivePaginate = 3 # The date format to use; for a list of valid formats, see https://gohugo.io/functions/format/ dateFormatToUse = "2006-01-02" diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 8e5edf1..09f90bb 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,7 +1,7 @@ {{ define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end }} {{ define "content"}} -{{- $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") (index .Site.Params "archive-paginate") }} +{{- $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") .Site.Params.archivePaginate }}
{{- if not $paginator.HasPrev }}
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index b373c7a..c20afb7 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1,7 +1,7 @@ {{ define "title" }}{{ .Title }} · {{ .Site.Title }}{{ end }} {{ define "content"}} -{{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") (index .Site.Params "archive-paginate") }} +{{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") .Site.Params.archivePaginate }}
{{ if not $paginator.HasPrev }} {{ if eq .Data.Plural "tags" }}