diff options
Diffstat (limited to 'layouts/index.html')
| -rw-r--r-- | layouts/index.html | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/layouts/index.html b/layouts/index.html index ec6d2eb..28e95ae 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,18 +1,29 @@ {{ define "main" -}} <div class="posts"> -{{ range .Site.RegularPages -}} -<article class="post"> - <h1 class="post-title"> - <a href="{{ .Permalink }}">{{ .Title }}</a> - </h1> - <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</time> - {{ .Summary }} - {{ if .Truncated }} - <div class="read-more-link"> - <a href="{{ .RelPermalink }}">Read More…</a> - </div> - {{ end }} -</article> -{{- end }} + {{ range .Site.RegularPages -}} + {{ if and (or (eq .Type "post") (eq .Type "article")) (or (not (isset .Params "Hidden")) (eq .Params.Hidden false)) -}} + <article class="post"> + <h1 class="post-title"> + <a href="{{ .Permalink }}">{{ .Title }}</a> + </h1> + + <div class="post-date"> + <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> · {{ .ReadingTime }} min read + </div> + + {{ if .Description }} + {{ .Description }} + {{ else }} + {{ .Summary }} + {{ end }} + + {{ if .Truncated }} + <div class="read-more-link"> + <a href="{{ .RelPermalink }}">Read More</a> + </div> + {{ end }} + </article> + {{- end }} + {{- end }} </div> {{- end }} |
