77 lines
3.4 KiB
HTML
77 lines
3.4 KiB
HTML
{{ partial "seo.html" . }}
|
|
|
|
<meta charset="utf-8">
|
|
<title>{{.Title | default site.Title}}</title>
|
|
|
|
<!-- base url -->
|
|
{{ if or (eq site.BaseURL "/") (eq site.BaseURL "http://localhost:1313/") (eq site.BaseURL "http://examplesite.org/") (eq site.BaseURL "https://examplesite.org/") (eq site.BaseURL "http://examplesite.com/") (eq site.BaseURL "https://examplesite.com/")}}{{else}}
|
|
<base href="{{ .Permalink }}">
|
|
{{ end }}
|
|
|
|
<!-- multilingual SEO optimizations -->
|
|
{{ if .IsTranslated }}
|
|
{{ range .AllTranslations }}
|
|
<link rel="alternate" hreflang="{{.Lang}}" href="{{ .RelPermalink | absLangURL }}">
|
|
{{ end }}
|
|
<link rel="alternate" hreflang="x-default" href="{{ .RelPermalink | absLangURL }}">
|
|
{{ end }}
|
|
|
|
<!-- mobile responsive meta -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
|
|
<meta name="description" content="{{ .Params.Description | default site.Params.description }}">
|
|
{{ with site.Params.author }}
|
|
<meta name="author" content="{{ . }}">{{ end }}
|
|
{{ hugo.Generator }}
|
|
|
|
<!-- theme meta -->
|
|
<meta name="theme-name" content="airspace-hugo" />
|
|
|
|
<!-- favicon -->
|
|
{{ $favicon:= site.Params.favicon }}
|
|
{{ if $favicon }}
|
|
{{ if fileExists (add `assets/` $favicon) }}
|
|
{{ $favicon:= resources.Get $favicon }}
|
|
{{ $favicon_16:= $favicon.Resize "16x png"}}
|
|
{{ $favicon_32:= $favicon.Resize "32x png"}}
|
|
{{ $favicon_180:= $favicon.Resize "180x png"}}
|
|
<link rel="shortcut icon" href="{{$favicon_32.RelPermalink}}" type="image/x-icon">
|
|
<link rel="icon" href="{{$favicon_32.RelPermalink}}" type="image/x-icon">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="{{$favicon_16.RelPermalink}}">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="{{$favicon_32.RelPermalink}}">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="{{$favicon_180.RelPermalink}}">
|
|
{{ end }}
|
|
{{ end }}
|
|
<link rel="manifest" href="{{`manifest.webmanifest` | relLangURL }}">
|
|
<meta name="msapplication-TileColor" content="{{site.Params.variables.color_primary | default `#da532c`}}">
|
|
<meta name="theme-color" content="{{site.Params.variables.body_color | default `#ffffff` }}">
|
|
|
|
<!-- Open Graph image and Twitter Card meta-data -->
|
|
{{ $image_path := .Params.image | default site.Params.image }}
|
|
{{ $image_path_local := printf "assets/%s" $image_path }}
|
|
{{ $image_ext := trim (path.Ext $image_path | lower) "." }}
|
|
{{ if fileExists $image_path_local }}
|
|
<meta property="og:image" content="{{ $image_path | absURL }}" />
|
|
<!-- If not SVG, read image aspect ratio and define Twitter Card and Open Graph width and height -->
|
|
{{ if ne $image_ext "svg" }}
|
|
{{ with (imageConfig $image_path_local) }}
|
|
{{ if (and (gt .Width 144) (gt .Height 144)) }}
|
|
<meta name="twitter:image" content="{{ $image_path | absURL }}" />
|
|
<meta name="twitter:card"
|
|
content="summary{{ if (and (gt .Width 300) (gt .Height 157) (not (eq .Width .Height))) }}_large_image{{ end }}">
|
|
{{ end }}
|
|
<meta property="og:image:width" content="{{ .Width }}">
|
|
<meta property="og:image:height" content="{{ .Height }}">
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ template "_internal/opengraph.html" . }}
|
|
|
|
<!-- AOS Animation CSS -->
|
|
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" defer></script>
|
|
|
|
<!-- Hugo SCSS Pipeline mit Template-Parsing -->
|
|
{{- $scss := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "scss/style.scss" . | toCSS (dict "targetPath" "css/style.css") | minify -}}
|
|
<link rel="stylesheet" href="{{ $scss.RelPermalink }}">
|