{{- /* SEO Configuration Partial */ -}}
{{- /* This partial includes all SEO-related partials */ -}}

<!-- Core SEO Meta Tags -->
{{ partial "seo/seo-meta.html" . }}

<!-- Dynamic meta tags based on content type -->
{{ partial "seo/meta-dynamic.html" . }}

<!-- Open Graph Tags -->
{{ partial "seo/opengraph.html" . }}

<!-- Twitter Cards -->
{{ partial "seo/twitter-cards.html" . }}

<!-- Structured Data (JSON-LD) -->
{{ partial "seo/structured-data.html" . }}

<!-- Favicons and PWA Support -->
{{ partial "seo/favicons.html" . }}

<!-- hreflang for multilingual sites -->
{{ partial "seo/hreflang.html" . }}

<!-- Additional SEO Tags -->
{{- if .Site.Params.seo.google_verification }}
<meta name="google-site-verification" content="{{ .Site.Params.seo.google_verification }}">
{{ end }}

{{- if .Site.Params.seo.bing_verification }}
<meta name="msvalidate.01" content="{{ .Site.Params.seo.bing_verification }}">
{{ end }}

{{- if .Site.Params.seo.yandex_verification }}
<meta name="yandex-verification" content="{{ .Site.Params.seo.yandex_verification }}">
{{ end }}

{{- if .Site.Params.seo.alexa_verification }}
<meta name="alexaVerifyID" content="{{ .Site.Params.seo.alexa_verification }}">
{{ end }}

<!-- Analytics and Tracking -->
{{- if .Site.Params.seo.google_analytics }}
<!-- Google Analytics 4 -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Params.seo.google_analytics }}"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', '{{ .Site.Params.seo.google_analytics }}');
</script>
{{ end }}

{{- if .Site.Params.seo.google_tag_manager }}
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','{{ .Site.Params.seo.google_tag_manager }}');</script>
{{ end }}

<!-- Additional verification codes -->
{{- range $name, $code := .Site.Params.seo.verification }}
{{- if $code }}
<meta name="{{ $name }}" content="{{ $code }}">
{{- end }}
{{- end }}
