All checks were successful
Hugo Publish CI / build-and-deploy (push) Successful in 13s
34 lines
1.0 KiB
HTML
34 lines
1.0 KiB
HTML
{{ if .Site.Params.schema }}
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "http://schema.org",
|
|
"@type": "{{ .Site.Params.schema.type }}",
|
|
"name": "{{ .Site.Params.schema.name }}",
|
|
"url": "{{ .Site.BaseURL }}",
|
|
"description": "{{ .Site.Params.schema.description }}",
|
|
"sameAs": [
|
|
{{ range $index, $url := .Site.Params.schema.sameAs }}{{ if $index }}, {{ end }}"{{ $url }}"{{ end }}
|
|
]
|
|
}
|
|
</script>
|
|
{{ end }}
|
|
|
|
{{ if .IsPage }}
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "http://schema.org",
|
|
"@type": "BlogPosting",
|
|
"headline": "{{ .Title }}",
|
|
"genre": "{{ .Params.categories | default "Blog" }}",
|
|
"wordcount": "{{ .WordCount }}",
|
|
"url": "{{ .Permalink }}",
|
|
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05-07:00" }}",
|
|
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" }}",
|
|
"description": "{{ .Description | default .Summary }}",
|
|
"author": {
|
|
"@type": "Person",
|
|
"name": "{{ .Site.Params.author }}"
|
|
}
|
|
}
|
|
</script>
|
|
{{ end }} |