Dear All
I added {{ .Summary }}
on my list.html like this →
{{ partial "head.html" . }}
{{ partial "header.html" . }}
<main class="main">
<header class="post-entry">
<a href="{{ .Permalink }}">
<h1>{{ .Title }}</h1>
</a>
</header>
{{ range (.Paginate (.Pages).Reverse).Pages }}
<article class="post-entry">
<a href="{{ .Permalink }}">
<header class="entry-header">
<h2>{{ .Title }}</h2>
</header>
<section class="entry-content">
{{ if eq .Section "quote" }}
<blockquote>
<h3>
{{ .Summary }}
{{ if .Truncated }} ... {{ end }}
</h3>
</blockquote>
{{ else }}
<h3>
{{ .Summary }}
{{ if .Truncated }} ... {{ end }}
</h3>
<div class="read-more">➜</div>
{{ end }}
</section>
</a>
</article>
{{ end }}
<nav class="pagination">
<a class="prev" href="{{ if .Paginator.HasPrev }}{{ .Paginator.Prev.URL }}{{ else }}#{{ end }}">« Prev</a>
<a class="next" href="{{ if .Paginator.HasNext }}{{ .Paginator.Next.URL }}{{ else }}#{{ end }}">Next »</a>
</nav>
</main>
{{ partial "footer.html" . }}
Also I added summaryLength: 30
on my config.yaml like this →
baseURL: https://angora.me
title: Bayu Angora
paginate: 6
paginatePath: /
summaryLength: 30
permalinks:
blog: /:title/
poem: /:title/
quote: /:title/
The paginate: 6
and paginatePath: /
is work without any issue. But the summaryLength: 30
is doesn’t work and display randomly. Sometime less than 30, sometimes more than 40 like this → Blog | Bayu Angora
How to fix this summaryLength?
Regards