66 lines
2.8 KiB
HTML
66 lines
2.8 KiB
HTML
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}">
|
|
|
|
<!-- opengraph meta -->
|
|
<!-- see https://github.com/nozzle/hugo-snippets/blob/master/layouts/partials/head/seo/open_graph.html -->
|
|
<meta content="{{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}" property="og:title">
|
|
<meta content="{{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}" property="og:description">
|
|
<meta property="og:url" content="{{ .Permalink }}" />
|
|
<meta property="og:type" content="{{ if .Params.type }}{{ .Params.type }}{{ else }}website{{ end }}" />
|
|
{{ if .Params.featured_image }}
|
|
<meta property="og:image" content="{{.Site.BaseURL}}{{ .Params.featured_image }}" />
|
|
{{ end }}
|
|
<!-- zie sidebar.html, zelfde logica gebruikt -->
|
|
{{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "articles") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
|
|
|
{{ if $related }}
|
|
{{ range $related }}
|
|
<meta property="og:see_also" content="{{ .Permalink }}" />
|
|
{{ end }}
|
|
{{ end }}
|
|
<meta property="article:published_time" content="{{ .PublishDate }}" />
|
|
<meta property="article:modified_time" content="{{ .Date }}" />
|
|
<meta property="article:section" content="{{ .Section }}" />
|
|
{{ with .Params.tags }}{{ range first 6 . }}
|
|
<meta property="article:tag" content="{{ . }}" />
|
|
{{ end }}{{ end }}
|
|
<!-- end og -->
|
|
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context" : "http://schema.org",
|
|
"@type" : "BlogPosting",
|
|
"mainEntityOfPage": {
|
|
"@type": "WebPage",
|
|
"@id": "{{ .Site.BaseURL }}"
|
|
},
|
|
"articleSection" : "{{ .Section }}",
|
|
"name" : "{{ .Title }}",
|
|
"headline" : "{{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}",
|
|
"description" : "{{ if .Description }}{{ .Description }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}",
|
|
"inLanguage" : "{{ .Site.LanguageCode }}",
|
|
{{ if .Params.featured_image }}
|
|
"image": "{{.Site.BaseURL}}{{ .Params.featured_image }}",
|
|
{{ end }}
|
|
"author" : {
|
|
"@type": "Person",
|
|
"name": "{{ .Site.Author.name }}"
|
|
},
|
|
"publisher": {
|
|
"@type": "Organization",
|
|
"name": "Brain Baking",
|
|
"logo": {
|
|
"@type": "ImageObject",
|
|
"url": "https://brainbaking.com/img/avatar-icon.png"
|
|
}
|
|
},
|
|
"accountablePerson" : "{{ .Site.Author.name }}",
|
|
"copyrightHolder" : "{{ .Site.Author.name }}",
|
|
"copyrightYear" : "{{ .Date.Format "2006" }}",
|
|
"datePublished": "{{ .Date }}",
|
|
"dateModified" : "{{ .Date }}",
|
|
"url" : "{{ .Permalink }}",
|
|
"wordCount" : "{{ .WordCount }}"
|
|
}
|
|
</script>
|
|
{{ partial "google-analytics-anonymous.html" . }}
|