speedtech-website/themes/lean/layouts/partials/head.html
2025-05-16 11:55:43 +02:00

45 lines
1.8 KiB
HTML

<head>
{{ $is_blog := and (eq .Type "blog") (eq .Kind "page") }}
<meta charset="utf-8">
<meta name="robots" content="all,follow">
<meta name="googlebot" content="index,follow,snippet,archive">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ $title_plain := .Title | markdownify | plainify }}
{{ if eq $title_plain "Blog"}}
<title>{{ .Site.Params.Title }} | Blog</title>
{{ else if $is_blog}}
<title>{{ .Site.Params.Title }} | Blog - {{ $title_plain }}</title>
{{ else }}
<title>{{ .Site.Params.Title }} | {{ $title_plain }}</title>
{{ end }}
<meta name="author" content="{{ .Param "author" }}">
{{ $keywords := .Site.Params.defaultMetaKeywords | default (slice "" | first 0) }}
{{ range .Params.metaKeywords }}{{ $keywords = $keywords | append . }}{{ end }}
{{ if gt (len $keywords) 0 }}
<meta name="keywords" content="{{ delimit (uniq $keywords) ", " }}">
{{ end }}
{{ $description_plain := default .Site.Params.defaultMetaDescription .Params.metaDescription | markdownify | plainify }}
<meta name="description" content="{{ $description_plain }}">
{{ hugo.Generator }}
<link href="{{ "css/main.css?8" | relURL }}" rel="stylesheet">
<link href="{{ "css/custom.css?8" | relURL }}" rel="stylesheet">
<!-- Favicon and Apple touch icons-->
<link rel="shortcut icon" href="{{ "img/favicon.ico" | relURL }}" type="image/x-icon">
<link rel="apple-touch-icon" href="{{ "img/apple-touch-icon.png" | relURL }}">
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ partial "opengraph.html" . }}
<script src="/js/htmx/htmx.min.js" defer></script>
<script src="/js/main.js" defer></script>
</head>