forked from laurens/fediversity_website
Toevoegen Article en uitbreiden WebPage
This commit is contained in:
parent
9f3350149d
commit
809f53f80f
|
@ -11,7 +11,11 @@
|
||||||
{{ else if in .Params.content_types "person" }}
|
{{ else if in .Params.content_types "person" }}
|
||||||
{{ partial "schemas/schema_Person.html" . }}
|
{{ partial "schemas/schema_Person.html" . }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ partial "schemas/schema_WebPage.html" . }}
|
{{ if gt .WordCount 100 }}
|
||||||
|
{{ partial "schemas/schema_Article.html" . }}
|
||||||
|
{{ else }}
|
||||||
|
{{ partial "schemas/schema_WebPage.html" . }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- else if .IsSection -}}
|
{{- else if .IsSection -}}
|
||||||
|
|
54
themes/nluug/layouts/partials/schemas/schema_Article.html
Normal file
54
themes/nluug/layouts/partials/schemas/schema_Article.html
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
<script type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@type": "Article",
|
||||||
|
"@id": "{{ .Permalink }}#article",
|
||||||
|
"datePublished": {{ .Date }},
|
||||||
|
"dateModified": {{ .Lastmod }},
|
||||||
|
"wordCount": {{ .WordCount }},
|
||||||
|
"inLanguage": "{{ .Site.LanguageCode }}",
|
||||||
|
"isPartOf": {
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@type": "WebPage",
|
||||||
|
"@id": "{{ .Permalink }}#webpage",
|
||||||
|
"name": "{{ .Title | default .Site.Params.textEmptyValue }}",
|
||||||
|
"datePublished": {{ .Date }},
|
||||||
|
"dateModified": {{ .Lastmod }},
|
||||||
|
"description": "{{ .Params.description }}",
|
||||||
|
"inLanguage": "{{ .Site.LanguageCode }}",
|
||||||
|
{{ if .Params.review.reviewed_by }}
|
||||||
|
{{ if findRE `^[a-z]+(\-[a-z]+)+$` .Params.review.reviewed_by 1 }}
|
||||||
|
{{ with (index $.Site.Data.personen .Params.review.reviewed_by) }}
|
||||||
|
"reviewedBy": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "{{ .name }}",
|
||||||
|
"sameAs": "{{ .profile_page | absURL }}"
|
||||||
|
},
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
"reviewedBy": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "{{ .Params.review.reviewed_by }}"
|
||||||
|
},
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Params.review.last_review }}
|
||||||
|
"lastReviewed": "{{ .Params.review.last_review }}",
|
||||||
|
{{ end }}
|
||||||
|
"mainContentOfPage": {
|
||||||
|
"@type": "WebPageElement",
|
||||||
|
"cssSelector": ".content"
|
||||||
|
},
|
||||||
|
"speakable": {
|
||||||
|
"@type": "SpeakableSpecification",
|
||||||
|
"cssSelector": ".speakable"
|
||||||
|
},
|
||||||
|
"isPartOf": {
|
||||||
|
"@type": "WebSite",
|
||||||
|
"@id": "{{ .Site.BaseURL }}#website",
|
||||||
|
"url": "{{ .Site.BaseURL }}",
|
||||||
|
"name": "{{ .Site.Title | default .Site.Params.textNoTitle }}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -7,6 +7,25 @@
|
||||||
"datePublished": {{ .Date }},
|
"datePublished": {{ .Date }},
|
||||||
"dateModified": {{ .Lastmod }},
|
"dateModified": {{ .Lastmod }},
|
||||||
"inLanguage": "{{ .Site.LanguageCode }}",
|
"inLanguage": "{{ .Site.LanguageCode }}",
|
||||||
|
{{ if .Params.review.reviewed_by }}
|
||||||
|
{{ if findRE `^[a-z]+(\-[a-z]+)+$` .Params.review.reviewed_by 1 }}
|
||||||
|
{{ with (index $.Site.Data.personen .Params.review.reviewed_by) }}
|
||||||
|
"reviewedBy": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "{{ .name }}",
|
||||||
|
"sameAs": "{{ .profile_page | absURL }}"
|
||||||
|
},
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
"reviewedBy": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "{{ .Params.review.reviewed_by }}"
|
||||||
|
},
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Params.review.last_review }}
|
||||||
|
"lastReviewed": "{{ .Params.review.last_review }}",
|
||||||
|
{{ end }}
|
||||||
"mainContentOfPage": {
|
"mainContentOfPage": {
|
||||||
"@type": "WebPageElement",
|
"@type": "WebPageElement",
|
||||||
"cssSelector": ".content"
|
"cssSelector": ".content"
|
||||||
|
|
Reference in a new issue