Cleanup and Fixes

This commit is contained in:
Alexandre Vicenzi 2020-06-15 19:52:15 +02:00
parent ac7ec7386b
commit 01322efeb2
11 changed files with 15 additions and 53 deletions

View file

@ -1,10 +1,6 @@
{{ define "main" -}}
<div class="posts">
{{- $regularPages := where .Site.RegularPages "Type" "in" .Site.Params.MainSections -}}
{{- $pagesNotHidden := where $regularPages ".Params.hidden" "==" false -}}
{{- $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil -}}
{{- $pages := $pagesNotHidden | union $pagesHiddenUnset -}}
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.MainSections -}}
{{- $paginator := .Paginate $pages -}}
{{ range $paginator.Pages }}
@ -14,14 +10,12 @@
</h1>
<div class="post-date">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> · {{ .ReadingTime }} min read
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> &middot; {{ .ReadingTime }} min read
</div>
{{ if .Description }}
{{ .Description }}
{{ else }}
<div>
{{ .Summary }}
{{ end }}
</div>
{{ if .Truncated }}
<div class="read-more-link">