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

155 lines
6.7 KiB
HTML
Raw Normal View History

2018-07-24 21:36:09 +02:00
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
2020-12-14 09:07:56 +01:00
<title>{{ .Title }} | {{ .Site.Title }}</title>
<meta content="{{ .Title }} | {{ .Site.Title }}" property="og:title">
2018-07-24 21:36:09 +02:00
<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">
2021-03-17 21:12:37 +01:00
<link rel="me" title="Mastodon" href="{{ .Site.Author.mastodonlink }}" />
<link rel="me" title="Github" href="{{ .Site.Author.githublink }}" />
<link rel="author" href="{{ .Site.BaseURL }}humans.txt" type="text/plain" />
<link rel="webmention" href="https://jam.brainbaking.com/webmention" />
<link rel="pingback" href="https://webmention.io/webmention?forward=https://jam.brainbaking.com/webmention" />
2018-07-24 21:36:09 +02:00
2020-12-13 21:50:18 +01:00
{{ if .Description }}
2020-12-14 09:07:56 +01:00
<meta name="description" content="{{ .Title }}. {{ .Description | safeHTML }} Via {{ .Site.Title }}">
<meta content="{{ .Title }}. {{ .Description | safeHTML }} Via {{ .Site.Title }}" property="og:description">
2020-12-13 21:50:18 +01:00
{{ else }}
2020-12-14 09:07:56 +01:00
<meta name="description" content="{{ .Title }}. {{ .Summary | safeHTML }}">
<meta content="{{ .Title }}. {{ .Summary | safeHTML }} Via {{ .Site.Title }}" property="og:description">
2020-12-13 21:50:18 +01:00
{{ end }}
2018-07-24 21:36:09 +02:00
{{ if .Keywords }}
<meta content="{{ delimit .Keywords ", " }}, {{ .Title }}" name="keywords">
2018-07-24 21:36:09 +02:00
{{ else if .Params.tags }}
<meta content="{{ delimit .Params.tags ", " }}, {{ .Title }}" name="keywords">
2018-07-24 21:36:09 +02:00
{{ end }}
<!-- opengraph meta -->
<!-- see https://github.com/nozzle/hugo-snippets/blob/master/layouts/partials/head/seo/open_graph.html -->
2020-12-14 09:07:56 +01:00
2018-07-24 21:36:09 +02:00
<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 -->
2018-07-25 10:07:03 +02:00
<!-- structured data -->
2020-06-09 13:31:33 +02:00
{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}
2018-07-25 10:07:03 +02:00
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
2020-06-09 13:31:33 +02:00
"@id": {{ .Site.BaseURL }}
2018-07-25 10:07:03 +02:00
},
"articleSection" : "{{ .Section }}",
2020-11-19 10:44:32 +01:00
"name" : {{ .Title }},
"headline" : {{ .Title }},
2020-06-09 13:31:33 +02:00
"description" : {{ if .Description }}{{ .Description }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }},
2018-07-25 10:07:03 +02:00
"inLanguage" : "{{ .Site.LanguageCode }}",
{{ if .Params.image }}
2020-06-09 13:31:33 +02:00
"image": {{ .Params.image | absURL }},
{{ else }}
"image": "{{.Site.BaseURL}}img/logo.png",
2018-07-25 10:07:03 +02:00
{{ end }}
"author" : {
"@type": "Person",
"name": "{{ .Site.Author.name }}"
2020-06-09 13:31:33 +02:00
},
"creator" : {
"@type": "Person",
"name": "{{ .Site.Author.name }}"
},
2018-07-25 10:07:03 +02:00
"publisher": {
"@type": "Organization",
"name": "Brain Baking",
2020-06-09 13:31:33 +02:00
"url": {{ .Site.BaseURL }},
2018-07-25 10:07:03 +02:00
"logo": {
"@type": "ImageObject",
2018-07-25 10:25:54 +02:00
"url": "https://brainbaking.com/img/avatar-icon.png",
"width": "150",
"height": "150"
2018-07-25 10:07:03 +02:00
}
},
"accountablePerson" : "{{ .Site.Author.name }}",
"copyrightHolder" : "{{ .Site.Author.name }}",
"copyrightYear" : "{{ .Date.Format "2006" }}",
2020-06-09 13:31:33 +02:00
"dateCreated": {{ .Date.Format $ISO8601 }},
"datePublished": {{ .PublishDate.Format $ISO8601 }},
"dateModified": {{ .Lastmod.Format $ISO8601 }},
"url" : {{ .Permalink }},
2018-07-25 10:07:03 +02:00
"wordCount" : "{{ .WordCount }}",
{{ if .Keywords }}
2020-11-19 10:44:32 +01:00
"keywords" : [ {{ range .Keywords }}{{ . }},{{ end }}{{ .Title }} ],
"genre" : [ {{ range .Keywords }}{{ . }},{{ end }}{{ .Title }} ]
2018-07-25 10:07:03 +02:00
{{ else if .Params.tags }}
2020-11-19 10:44:32 +01:00
"keywords" : [ {{ if isset .Params "tags" }}{{ range .Params.tags }}{{ . }},{{ end }}{{ end }}{{ .Title }} ],
"genre" : [ {{ if isset .Params "tags" }}{{ range .Params.tags }}{{ . }},{{ end }}{{ end }}{{ .Title }} ]
{{ else }}
2020-11-19 10:44:32 +01:00
"keywords": [ {{ .Title }} ]
2018-07-25 10:07:03 +02:00
{{ end }}
}
</script>
2018-07-24 21:36:09 +02:00
<link rel="preload" href="{{ "css/bootstrap.min.css" | absURL }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="preload" href="{{ "css/font-awesome.min.css" | absURL }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="preload" href="{{ "css/simple-lightbox.min.css" | absURL }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="{{ "css/bootstrap.min.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/font-awesome.min.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/simple-lightbox.min.css" | absURL }}">
</noscript>
<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 }}'>
2018-07-24 21:36:09 +02:00
<noscript>
<style>
figure a img {
max-width: 100%;
}
.sidebar-game-platform {
max-height: 100%;
}
</style>
</noscript>
2018-07-24 21:36:09 +02:00
<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") }}
2020-10-26 10:42:19 +01:00
<script data-goatcounter="https://stats.jefklakscodex.com/count"
async src="//stats.jefklakscodex.com/count.js"></script>
{{- end }}
2020-11-25 08:57:24 +01:00
<!-- twitter cards -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ .Title }}">
<meta name="twitter:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}">
{{ if .Params.image }}
<meta name="twitter:image" content="{{ .Params.image | absURL }}">
{{ end }}
<meta name="twitter:image:alt" content="Figure of {{ .Title }}">