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",
|
2017-03-24 15:49:26 +01:00
|
|
|
{{- /* 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-03-24 15:31:50 +01:00
|
|
|
"url": "{{ . | absURL }}"
|
|
|
|
{{- /* Don't try to get imageConfig if image param is not local */ -}}
|
|
|
|
{{- if not (or (hasPrefix . "http://") (hasPrefix . "https://")) -}}
|
|
|
|
{{- with (imageConfig (printf "/static/%s" .)) -}}
|
|
|
|
,
|
2017-03-24 15:02:44 +01:00
|
|
|
"height": "{{ .Height }}",
|
|
|
|
"width": "{{ .Width }}"
|
2017-03-24 15:49:26 +01:00
|
|
|
{{- end -}}
|
2017-03-24 15:31:50 +01:00
|
|
|
{{ end }}
|
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 }}",
|
2017-03-24 15:49:26 +01:00
|
|
|
{{- $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-03-24 15:49:26 +01:00
|
|
|
{{- else }}
|
2017-02-21 07:17:19 +01:00
|
|
|
"datePublished": "{{ .Date.Format $ISO8601 }}",
|
2017-03-24 15:49:26 +01:00
|
|
|
{{- end }}
|
|
|
|
{{- if not .Lastmod.IsZero }}
|
2017-02-21 07:17:19 +01:00
|
|
|
"dateModified": "{{ .Lastmod.Format $ISO8601 }}",
|
2017-03-24 15:49:26 +01:00
|
|
|
{{- end }}
|
|
|
|
{{- with .Site.Social.GooglePlus }}
|
2017-02-21 07:17:19 +01:00
|
|
|
"publisher": "{{ printf "%s" . }}",
|
2017-03-24 15:49:26 +01:00
|
|
|
{{- end }}
|
2017-01-20 14:56:33 +01:00
|
|
|
"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
|
|
|
}
|
2018-02-02 11:56:19 +01:00
|
|
|
{{- if or (.Params.keywords) (or (.Params.categories) (.Params.tags)) -}}
|
2017-01-20 14:56:33 +01:00
|
|
|
,
|
2018-02-02 11:56:19 +01:00
|
|
|
"keywords": "{{ delimit (union .Params.keywords (union .Params.categories .Params.tags)) ", " }}"
|
2017-03-24 15:49:26 +01:00
|
|
|
{{- end }}
|
2017-01-20 14:56:33 +01:00
|
|
|
|
|
|
|
{{- with .Params.description -}}
|
|
|
|
,
|
2017-02-21 07:17:19 +01:00
|
|
|
"description": "{{ . }}"
|
2017-03-24 15:49:26 +01:00
|
|
|
{{- end }}
|
2017-01-20 14:56:33 +01:00
|
|
|
}
|
|
|
|
</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) }}
|
2017-07-07 14:31:17 +02:00
|
|
|
{{ template "_internal/disqus.html" . }}
|
2017-01-07 10:22:45 +01:00
|
|
|
{{ 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: */}}
|