jefklakscodex/themes/jefklak-creative-portfolio/layouts/partials/head.html

125 lines
5.3 KiB
HTML

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{{ with .Title }}<title>{{ . }}</title>{{ end }}
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="all,follow">
<meta name="googlebot" content="index,follow,snippet,archive">
<meta name="description" content="{{ .Site.Title }} - {{ .Site.Title }}">
{{ if .Keywords }}
<meta content="{{ delimit .Keywords ", " }}" name="keywords">
{{ else if .Params.tags }}
<meta content="{{ delimit .Params.tags ", " }}" name="keywords">
{{ 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.image }}
<meta property="og:image" content="{{.Site.BaseURL}}{{ .Params.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 -->
<!-- structured data -->
<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.image }}
"image": "{{.Site.BaseURL}}{{ .Params.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",
"width": "150",
"height": "150"
}
},
"accountablePerson" : "{{ .Site.Author.name }}",
"copyrightHolder" : "{{ .Site.Author.name }}",
"copyrightYear" : "{{ .Date.Format "2006" }}",
"datePublished": "{{ .Date }}",
"dateModified" : "{{ .Lastmod }}",
"url" : "{{ .Permalink }}",
"wordCount" : "{{ .WordCount }}",
{{ if .Keywords }}
"keywords" : [ {{ range .Keywords }}"{{ . }}",{{ end }}"{{ .Title }}" ]
{{ else if .Params.tags }}
"keywords" : [ {{ if isset .Params "tags" }}{{ range .Params.tags }}"{{ . }}",{{ end }}{{ end }}"{{ .Title }}" ]
{{ else }}
"keywords": [ "{{ .Title }}" ]
{{ end }}
}
</script>
<style>
body, .content-column-content, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
font-family: '{{ .Site.Params.font }}', sans-serif !important;
}
</style>
<link rel="stylesheet" href="{{ "css/bootstrap.min.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/font-awesome.min.css" | absURL }}">
<link href="{{ "css/style.default.css" | absURL }}" rel="stylesheet" id="theme-stylesheet">
{{- $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") -}}
{{- $styles := resources.Get "sass/main.sass" | resources.ExecuteAsTemplate "main.sass" . | resources.ToCSS $options | resources.Fingerprint "sha512" }}
<link rel = 'stylesheet' href = '{{ $styles.Permalink }}' integrity = '{{ $styles.Data.Integrity }}'>
<link rel="shortcut icon" href="{{ "img/favicon.png" | absURL }}">
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="Jefklak's Codex" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="Jefklak's Codex" />
{{ end }}
{{- if (ne hugo.Environment "development") }}
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, '//fathom.brainbaking.com/tracker.js', 'fathom');
fathom('set', 'siteId', '{{ .Site.Params.fathomid }}');
fathom('trackPageview');
</script>
<!-- / Fathom -->
{{- end }}