{{ if .IsPage }}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "{{ .Title }}",
  "description": "{{ .Description | default (.Summary | plainify) }}",
  "datePublished": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
  "dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
  "author": {
    "@type": "Organization",
    "name": "Agiliton",
    "url": "https://www.agiliton.eu"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Agiliton",
    "url": "https://www.agiliton.eu"
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "{{ .Permalink }}"
  },
  "inLanguage": "{{ .Language.Lang }}",
  "wordCount": {{ .WordCount }}
  {{ with .Params.tags }},
  "keywords": {{ . | jsonify }}
  {{ end }}
}
</script>
{{/* BreadcrumbList for AI search navigation */}}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "{{ site.Title }}",
      "item": "{{ site.BaseURL }}"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "{{ .Section | title }}",
      "item": "{{ printf "%s%s/" site.BaseURL .Section }}"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "{{ .Title }}",
      "item": "{{ .Permalink }}"
    }
  ]
}
</script>
{{ else }}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "{{ site.Title }}",
  "url": "{{ site.BaseURL }}",
  "description": "{{ site.Params.description }}",
  "publisher": {
    "@type": "Organization",
    "name": "Agiliton",
    "url": "https://www.agiliton.eu"
  }
}
</script>
{{ end }}
