Datumsformate
This commit is contained in:
parent
cb1087c87f
commit
deabc3ec03
|
|
@ -14,7 +14,7 @@
|
||||||
<a href="{{ .RelPermalink }}">{{ i18n "read-more" }}…</a>
|
<a href="{{ .RelPermalink }}">{{ i18n "read-more" }}…</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<footer>
|
<footer>
|
||||||
<time class="list-item-lastmod" datetime="{{ .Lastmod }}">{{ .Lastmod.Format "02.01.2006 15:04" }}</time>
|
<time class="list-item-lastmod" datetime='{{ .Lastmod.Format "2006-01-02T15:04-07:00" }}'>{{ .Lastmod.Format "02.01.2006 15:04" }}</time>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@
|
||||||
{{ partial "schema/organization.jsonld" (dict "org" . "ctx" $context "short" true) }}
|
{{ partial "schema/organization.jsonld" (dict "org" . "ctx" $context "short" true) }}
|
||||||
{{- end -}},
|
{{- end -}},
|
||||||
"copyrightYear": "{{ .post.Date.Format "2006" }}",
|
"copyrightYear": "{{ .post.Date.Format "2006" }}",
|
||||||
"datePublished": "{{ .post.PublishDate | safeHTML }}",
|
"datePublished": {{ .post.PublishDate.Format "2006-01-02T15:04-07:00" | jsonify }},
|
||||||
"dateModified": "{{ .post.Lastmod | safeHTML }}",
|
"dateModified": {{ .post.Lastmod.Format "2006-01-02T15:04-07:00" | jsonify }},
|
||||||
"url": "{{ .post.Permalink }}",
|
"url": "{{ .post.Permalink }}",
|
||||||
"wordCount": "{{ .post.WordCount }}",
|
"wordCount": "{{ .post.WordCount }}",
|
||||||
"keywords": "{{ with .post.Keywords }}{{ delimit . ", " }}{{ end }}",
|
"keywords": "{{ with .post.Keywords }}{{ delimit . ", " }}{{ end }}",
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,10 @@
|
||||||
{{ partial "schema/organization.jsonld" (dict "org" . "ctx" $context "short" true) }}
|
{{ partial "schema/organization.jsonld" (dict "org" . "ctx" $context "short" true) }}
|
||||||
{{- end -}},
|
{{- end -}},
|
||||||
"copyrightYear": "{{ .post.Date.Format "2006" }}",
|
"copyrightYear": "{{ .post.Date.Format "2006" }}",
|
||||||
"datePublished": "{{ .post.PublishDate | safeHTML }}",
|
"datePublished": {{ .post.PublishDate.Format "2006-01-02T15:04-07:00" | jsonify }},
|
||||||
"dateModified": "{{ .post.Lastmod | safeHTML }}",
|
"dateModified": {{ .post.Lastmod.Format "2006-01-02T15:04-07:00" | jsonify }},
|
||||||
"url": "{{ .post.Permalink }}",
|
"url": "{{ .post.Permalink }}",
|
||||||
"wordCount": "{{ .post.WordCount }}",
|
"wordCount": "{{ .post.WordCount }}",
|
||||||
"keywords": "{{ with .post.Keywords }}{{ delimit . ", " }}{{ end }}",
|
"keywords": "{{ with .post.Keywords }}{{ delimit . ", " }}{{ end }}",
|
||||||
{{ $imageURL := path.Join .post.RelPermalink "bilder/" .post.Params.featuredImage }}
|
"articleBody": {{ delimit .post.PlainWords " " | jsonify }}
|
||||||
"image": {{ partial "schema/image.jsonld" (dict "url" $imageURL "ctx" .ctx) }},
|
|
||||||
"articleBody": {{ .ctx.Content | jsonify }}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
{{ with .ctx.Site.Params.description }}
|
{{ with .ctx.Site.Params.description }}
|
||||||
"description": "{{ . }}",
|
"description": "{{ . }}",
|
||||||
{{ end }}
|
{{ end }}
|
||||||
"dateModified": "{{ .site.Lastmod }}",
|
"datePublished": {{ .site.PublishDate.Format "2006-01-02T15:04-07:00" | jsonify }},
|
||||||
"dateCreated": "{{ .site.PublishDate }}"
|
"dateModified": {{ .site.Lastmod.Format "2006-01-02T15:04-07:00" | jsonify }},
|
||||||
{{ end }}
|
{{ end }}
|
||||||
}
|
}
|
||||||
|
|
@ -17,6 +17,6 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<footer class="single-footer padding">
|
<footer class="single-footer padding">
|
||||||
<p>
|
<p>
|
||||||
<i class="fa fa-calendar"></i> <time datetime='{{ .Lastmod.Format "2006-01-02T15:04-06:00" }}'>{{ .Lastmod.Format "02.01.2006 15:04" }}</time>
|
<i class="fa fa-calendar"></i> <time datetime='{{ .Lastmod.Format "2006-01-02T15:04-07:00" }}'>{{ .Lastmod.Format "02.01.2006 15:04" }}</time>
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
Loading…
Reference in New Issue