{{/* Structured data for SEO + AI search */}}
{{ partial "structured-data.html" . }}

{{/* Hreflang tags for multilingual SEO */}}
{{ if .IsTranslated }}
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" />
{{ range .Translations }}
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" />
{{ end }}
{{ end }}

{{/* Canonical URL */}}
<link rel="canonical" href="{{ .Permalink }}" />

{{/* AI Search Engine Optimization */}}
<meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large" />
<meta name="googlebot" content="index, follow" />

{{ if .IsPage }}
<meta name="topic" content="{{ .Title }}" />
<meta name="subject" content="{{ .Description | default .Summary | plainify | truncate 160 }}" />
{{ with .Params.tags }}<meta name="keywords" content="{{ delimit . ", " }}" />{{ end }}
<meta name="article:published_time" content="{{ .Date.Format "2006-01-02" }}" />
<meta name="article:modified_time" content="{{ .Lastmod.Format "2006-01-02" }}" />
<meta name="article:section" content="{{ .Section }}" />
<meta name="article:author" content="{{ .Params.author | default "Agiliton" }}" />
{{ end }}

{{/* LLMs.txt discovery */}}
<link rel="alternate" type="text/plain" href="/llms.txt" title="LLM-readable site description" />
