Don't re-print the name of series when listing pages
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
b282843b40
commit
a4bff7623d
|
@ -1,5 +1,11 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .page.Permalink }}" class="post-title">{{ if .page.Params.favorite }}{{ partial "icon.html" "star" }}{{ end }} {{ .page.Title }}</a>
|
{{- $scratch := newScratch -}}
|
||||||
|
{{- if .seriesName -}}
|
||||||
|
{{- partial "nameinseries" (dict "page" .page "scratch" $scratch) -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $scratch.Set "name" (.page.Title) -}}
|
||||||
|
{{- end -}}
|
||||||
|
<a href="{{ .page.Permalink }}" class="post-title">{{ if .page.Params.favorite }}{{ partial "icon.html" "star" }}{{ end }} {{ $scratch.Get "name" }}</a>
|
||||||
{{ if (not (eq .page.WordCount 0)) }}
|
{{ if (not (eq .page.WordCount 0)) }}
|
||||||
<p class="post-wordcount">{{ i18n "nWords" .page.WordCount }}, {{ i18n "nMinutesToRead" .page.ReadingTime }}.</p>
|
<p class="post-wordcount">{{ i18n "nWords" .page.WordCount }}, {{ i18n "nMinutesToRead" .page.ReadingTime }}.</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<ul class="post-list">
|
<ul class="post-list">
|
||||||
{{ range $pages }}
|
{{ range $pages }}
|
||||||
{{ partial "post.html" (dict "page" .) }}
|
{{ partial "post.html" (dict "page" . "seriesName" true) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user