remove redundant layout, add showSummary switch

This commit is contained in:
loikein 2023-04-25 15:45:22 +01:00
commit fa6bda5448
4 changed files with 6 additions and 22 deletions

View file

@ -1,21 +0,0 @@
{{ .Title }}
<!-- {{ template "_internal/pagination.html" }} -->
Hello this is a list of content.
{{ .TableOfContents }}
{{ $paginator := .Paginate ( (.Data.Pages.GroupByDate "2006") ) }}
<ul>
<li>PageNumber: {{ $paginator.PageNumber }}</li>
<li>URL: {{ $paginator.URL}}</li>
<li>Pages: {{ $paginator.Pages }}</li>
<li>TotalPages: {{ $paginator.TotalPages }}</li>
</ul>
{{ range $paginator.PageGroups }}
<h2>{{ .Key }}</h2>
{{ range .Pages }}
<br/>
<a href="{{ .RelPermalink }}">{{.Title}}</a>
{{ end }}
{{ end }}

View file

@ -22,8 +22,10 @@
{{ if .Description }}
<p>{{ .Description }}</p>
{{ else }}
{{ if .Site.Params.showSummary }}
<p>{{ truncate 140 .Summary }}</p>
{{ end }}
{{ end }}
{{ end }}
</section>