refactor: archive-paginate rename to archivePaginate

This commit is contained in:
olOwOlo 2018-01-31 22:19:44 +08:00
parent 8c2030327f
commit 7a5ee0ce25
No known key found for this signature in database
GPG key ID: 456394B6E7A15EA6
3 changed files with 3 additions and 3 deletions

View file

@ -52,7 +52,7 @@ copyright = "" # default: author.name ↓ # 默认为下面配
description = "Hugo theme even example site." description = "Hugo theme even example site."
# paginate of archives, tags and categories # 归档、标签、分类每页显示的文章数目,建议修改为一个较大的值 # 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/ # The date format to use; for a list of valid formats, see https://gohugo.io/functions/format/
dateFormatToUse = "2006-01-02" dateFormatToUse = "2006-01-02"

View file

@ -1,7 +1,7 @@
{{ define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end }} {{ define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end }}
{{ define "content"}} {{ 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 }}
<section id="archive" class="archive"> <section id="archive" class="archive">
{{- if not $paginator.HasPrev }} {{- if not $paginator.HasPrev }}
<div class="archive-title"> <div class="archive-title">

View file

@ -1,7 +1,7 @@
{{ define "title" }}{{ .Title }} · {{ .Site.Title }}{{ end }} {{ define "title" }}{{ .Title }} · {{ .Site.Title }}{{ end }}
{{ define "content"}} {{ 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 }}
<section id="archive" class="archive"> <section id="archive" class="archive">
{{ if not $paginator.HasPrev }} {{ if not $paginator.HasPrev }}
{{ if eq .Data.Plural "tags" }} {{ if eq .Data.Plural "tags" }}