Files
pivoine.art/layouts/partials/head.html
T

134 lines
4.6 KiB
HTML
Raw Normal View History

<meta charset="utf-8" />
<meta name="htmx-config" content='{"globalViewTransitions":true,"scrollBehavior":"smooth"}' />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#FF1A8C" />
2026-04-08 19:49:15 +02:00
<title>
{{- if .IsHome -}}
{{- .Site.Title }} —
{{ .Site.Params.tagline -}}
2026-04-08 19:49:15 +02:00
{{- else -}}
{{- .Title }} —
{{ .Site.Title -}}
2026-04-08 19:49:15 +02:00
{{- end -}}
</title>
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}" />
<meta name="author" content="{{ with .Params.author }}{{ . }}{{ else }}{{ .Site.Params.author }}{{ end }}" />
{{- if .Site.Params.robots }}<meta name="robots" content="{{ .Site.Params.robots }}" />{{ end }}
2026-04-08 19:49:15 +02:00
<!-- Open Graph -->
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta
property="og:title"
content="{{ if .IsHome }}
{{ .Site.Title }} —
{{ .Site.Params.tagline }}
{{ else }}
{{ .Title }}
{{ end }}"
/>
<meta
property="og:description"
content="{{ with .Description }}
{{ . }}
{{ else }}
{{ .Site.Params.description }}
{{ end }}"
/>
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:locale" content="{{ .Site.LanguageCode | default "en_US" | replaceRE "-" "_" }}" />
2026-04-08 19:49:15 +02:00
{{- $ogImage := .Site.Params.ogImage -}}
{{- $ogImageAlt := .Site.Title -}}
{{- with .Params.banner -}}
{{- $ogImage = .src -}}
{{- $ogImageAlt = $.Title -}}
{{- end -}}
<meta property="og:image" content="{{ $ogImage | absURL }}" />
<meta property="og:image:alt" content="{{ $ogImageAlt }}" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
2026-04-08 19:49:15 +02:00
{{- if .IsPage }}
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" />
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}" />
{{- with .Params.author }}<meta property="article:author" content="{{ . }}" />{{ end }}
{{- range .Params.categories }}<meta property="article:section" content="{{ . }}" />{{ end }}
{{- range .Params.tags }}<meta property="article:tag" content="{{ . }}" />{{ end }}
2026-04-08 19:49:15 +02:00
{{- end }}
2026-04-08 19:49:15 +02:00
<!-- Twitter / X Card -->
<meta name="twitter:card" content="summary_large_image" />
2026-04-08 19:49:15 +02:00
{{- with .Site.Params.twitterHandle }}
<meta name="twitter:site" content="@{{ . }}" />
2026-04-08 19:49:15 +02:00
{{- end }}
<meta
name="twitter:title"
content="{{ if .IsHome }}
{{ .Site.Title }} —
{{ .Site.Params.tagline }}
{{ else }}
{{ .Title }}
{{ end }}"
/>
<meta
name="twitter:description"
content="{{ with .Description }}
{{ . }}
{{ else }}
{{ .Site.Params.description }}
{{ end }}"
/>
<meta name="twitter:image" content="{{ $ogImage | absURL }}" />
<meta name="twitter:image:alt" content="{{ $ogImageAlt }}" />
2026-04-08 19:49:15 +02:00
<!-- Canonical -->
<link rel="canonical" href="{{ .Permalink }}" />
2026-04-08 19:49:15 +02:00
<!-- JSON-LD structured data -->
{{- partial "schema.html" . -}}
<!-- Fonts — Bebas Neue + Barlow + Share Tech Mono (non-render-blocking) -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="preload"
as="style"
href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Share+Tech+Mono&display=swap"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Share+Tech+Mono&display=swap"
media="print"
onload="this.media='all'"
/>
<noscript
><link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Share+Tech+Mono&display=swap"
/></noscript>
2026-04-08 19:49:15 +02:00
<!-- CSS via Hugo Pipes + PostCSS + Tailwind v4 -->
{{- $css := resources.Get "css/main.css" | css.PostCSS -}}
{{- if eq hugo.Environment "production" -}}
{{- $css = $css | minify | fingerprint "sha256" -}}
{{- end -}}
<link
rel="stylesheet"
href="{{ $css.RelPermalink }}"
{{ if eq hugo.Environment "production" }}integrity="{{ $css.Data.Integrity }}"{{ end }}
/>
2026-04-08 19:49:15 +02:00
<!-- Favicon & PWA -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="msapplication-TileColor" content="#050510" />