add hidden page param #124
This commit is contained in:
parent
0b15d3bc48
commit
0c92c7b71a
8 changed files with 48 additions and 7 deletions
|
@ -5,11 +5,11 @@
|
|||
|
||||
<div class="articles h-feed">
|
||||
<h1 class="post-title">{{ i18n .Title }}</h1>
|
||||
{{ $pages := where .Pages "Type" "in" site.Params.mainSections }}
|
||||
{{ $pages := where (where .Pages "Type" "in" site.Params.mainSections) "Params.hidden" "!=" true}}
|
||||
{{ range $pages }}
|
||||
<div class="post-short-list h-entry">
|
||||
<div class="post-header">
|
||||
<header>
|
||||
<header>
|
||||
<h2 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h2>
|
||||
{{ partial "post-language-switcher.html" . }}
|
||||
</header>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := where $pctx.RegularPages ".Params.disable_feed" "!=" true -}}
|
||||
{{- $pages := where (where $pctx.RegularPages ".Params.disable_feed" "!=" true) "Params.hidden" "!=" true -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<div class="post-info">
|
||||
<a href="{{ (print .Data.Plural "/") | relLangURL }}">{{ i18n (printf "toAll%s" (.Data.Plural | humanize )) | humanize }}</a>
|
||||
</div>
|
||||
{{ range .Paginator.Pages }}
|
||||
{{ $pages := where .Pages "Params.hidden" "!=" true }}
|
||||
{{ range (.Paginate $pages).Pages }}
|
||||
{{ partial "post-summary.html" . }}
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue