mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-30 02:12:18 +00:00
37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
{{- $postDate := .Date.Format "2006-01-02" }}
|
|
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
|
|
{{ if or (.Params.description) (.Params.date) }}
|
|
{{ if .Params.description }}<p>{{ .Params.description }}</p>{{ end }}
|
|
<p>
|
|
{{ with $postDate }}<table><tr><td>posted:</td><td>{{ . }}</td></tr>{{- if ne $postDate $updateDate }}<tr><td>updated:</td><td>{{ $updateDate }}</td></tr>{{ end }}</table>{{ end }}
|
|
</p>
|
|
<p>
|
|
{{- with .Params.tags -}}
|
|
tags:<br>
|
|
{{- range . }}
|
|
{{- $tag := urlize . -}}
|
|
[<a href='{{ absLangURL (printf "tags/%s" $tag) }}' title="{{ . }}">{{ . }}</a>]
|
|
{{- end }}
|
|
{{- end }}
|
|
</p>
|
|
<hr>
|
|
{{ end }}
|
|
{{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) }}
|
|
<h2>On this page</h2>
|
|
{{ .TableOfContents }}
|
|
<hr>
|
|
{{ end }}
|
|
|
|
{{- $posts := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
|
{{- $featured := default 8 .Site.Params.numberOfFeaturedPosts }}
|
|
{{- $featuredPosts := first $featured (where $posts "Params.featured" true)}}
|
|
{{- with $featuredPosts }}
|
|
<h2>Featured Posts</h2>
|
|
<ul>
|
|
{{- range . }}
|
|
<li>
|
|
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title | markdownify }}</a>
|
|
</li>
|
|
{{- end }}
|
|
</ul>
|
|
{{- end }}
|