2016-10-06 14:03:35 +02:00
{{ define "title" }}{{ .Title | markdownify }} | {{ .Site.Title }}{{ end }}
2017-01-20 14:56:33 +01:00
{{ define "schema-dot-org" }}
< script type = "application/ld+json" >
{
"@context": "http://schema.org",
"@type": "BlogPosting",
{{/* Google recommends the headline be no more than 110 characters */}}
"headline": {{ substr .Title 0 110 }},
{{- with .Params.images -}}{{ range first 1 . }}
"image": {
"@type": "ImageObject",
"url": {{ . | absURL }}
},
{{- end -}}{{ end }}
"url": {{ printf "%s" .Permalink }},
"wordCount": "{{ .WordCount }}",
{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}
{{ if not .PublishDate.IsZero }}
"datePublished": {{ .PublishDate.Format $ISO8601 }},
{{ else }}
"datePublished": {{ .Date.Format $ISO8601 }},
{{ end }}
{{ if not .Lastmod.IsZero }}
"dateModified": {{ .Lastmod.Format $ISO8601 }},
{{ end }}
{{ with .Site.Social.GooglePlus }}
"publisher": {{ printf "%s" . }},
{{ end }}
"author": {
"@type": "Person",
"name": {{ .Params.author | default .Site.Params.author }}
}
{{ if or (.Params.categories) (.Params.tags) }}
,
"keywords": "{{ with .Params.categories }}{{ range $i, $e := . }}{{ if $i }},{{ end }}{{ $e }}{{ end }},{{ end }}{{ with .Params.tags }}{{ range $i, $e := . }}{{ if $i }},{{ end }}{{ $e }}{{ end }}{{ end }}"
{{ end }}
{{- with .Params.description -}}
,
"description": {{ . }}
{{ end }}
}
< / script >
{{ end }}
2016-09-01 16:37:27 +02:00
{{ define "main" }}
2016-10-18 05:39:41 +02:00
{{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }}
2016-11-24 13:39:39 +01:00
< article class = "blog-post" >
< header >
< h2 class = "blog-post-title" > < a href = "{{ .Permalink }}" > {{ .Title | markdownify }}< / a > < / h2 >
< p class = "blog-post-meta" > < time datetime = "{{ .Date.Format " 2006-01-02T15:04:05Z07:00 " } } " > {{ .Date.Format $dateFormat }}< / time > by {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} in {{ partial "meta-terms.html" . }}{{ end }}< / p >
< / header >
{{ .Content }}
2016-09-18 16:11:08 +02:00
2016-11-24 13:39:39 +01:00
{{ if .IsTranslated }}
< h4 > {{ i18n "translations" }}< / h4 >
< ul >
{{ range .Translations }}
< li >
< a href = "{{ .Permalink }}" > {{ .Lang }}: {{ .Title }}{{ if .IsPage }}{{ end }}< / a >
< / li >
{{ end }}
< / ul >
{{ end }}
2017-01-07 10:22:45 +01:00
{{ if or (not .Site.Params.sharingicons.hide) (.Site.DisqusShortname) }}
< hr >
< footer >
2016-11-24 13:39:39 +01:00
{{ if not .Site.Params.sharingicons.hide }}
{{ partial "sharing-icons.html" . }}
2016-11-01 15:25:44 +01:00
{{ end }}
2016-11-24 13:39:39 +01:00
2017-01-07 10:22:45 +01:00
{{ if and (.Site.DisqusShortname) (ne .Params.comments false) }}
{{ partial "disqus.html" . }}
{{ end }}
< / footer >
{{ end }}
< / article > <!-- /.blog - post -->
2016-11-01 15:25:44 +01:00
2016-09-01 16:37:27 +02:00
{{ end }}
2016-11-24 13:33:56 +01:00
{{- /* vim: set ts=2 sw=2 et: */}}