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 */}}
2017-02-21 07:17:19 +01:00
"headline": "{{ substr .Title 0 110 }}",
2017-01-20 14:56:33 +01:00
{{- with .Params.images -}}{{ range first 1 . }}
"image": {
"@type": "ImageObject",
2017-02-21 07:17:19 +01:00
"url": "{{ . | absURL }}"
2017-01-20 14:56:33 +01:00
},
{{- end -}}{{ end }}
2017-02-21 07:17:19 +01:00
"url": "{{ printf "%s" .Permalink }}",
2017-01-20 14:56:33 +01:00
"wordCount": "{{ .WordCount }}",
{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}
{{ if not .PublishDate.IsZero }}
2017-02-21 07:17:19 +01:00
"datePublished": "{{ .PublishDate.Format $ISO8601 }}",
2017-01-20 14:56:33 +01:00
{{ else }}
2017-02-21 07:17:19 +01:00
"datePublished": "{{ .Date.Format $ISO8601 }}",
2017-01-20 14:56:33 +01:00
{{ end }}
{{ if not .Lastmod.IsZero }}
2017-02-21 07:17:19 +01:00
"dateModified": "{{ .Lastmod.Format $ISO8601 }}",
2017-01-20 14:56:33 +01:00
{{ end }}
{{ with .Site.Social.GooglePlus }}
2017-02-21 07:17:19 +01:00
"publisher": "{{ printf "%s" . }}",
2017-01-20 14:56:33 +01:00
{{ end }}
"author": {
"@type": "Person",
2017-02-21 07:17:19 +01:00
"name": "{{ .Params.author | default .Site.Params.author }}"
2017-01-20 14:56:33 +01:00
}
{{ 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 -}}
,
2017-02-21 07:17:19 +01:00
"description": "{{ . }}"
2017-01-20 14:56:33 +01:00
{{ 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
2017-01-21 18:16:57 +01:00
{{ if or (ne ($.Param "sharingicons") false) (.Site.DisqusShortname) }}
2017-01-07 10:22:45 +01:00
< hr >
< footer >
2017-01-21 18:16:57 +01:00
{{ if (ne ($.Param "sharingicons") false) }}
2016-11-24 13:39:39 +01:00
{{ 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: */}}