{% extends "base.html" %}

{% block extrahead %}
{{ super() }}

{# ── GEO: JSON-LD + meta tags (page context required — skip for 404 and theme templates) ── #}
{% if page %}

{# ── Organization + SoftwareApplication JSON-LD (site-wide) ── #}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://roboflow.com/#organization",
      "name": "Roboflow",
      "url": "https://roboflow.com",
      "description": "Roboflow builds computer vision infrastructure and tools for training and deploying vision AI models.",
      "foundingDate": "2019",
      "logo": "{{ 'assets/logo-trackers-violet.svg' | url }}",
      "sameAs": [
        "https://github.com/roboflow",
        "https://twitter.com/roboflow",
        "https://www.linkedin.com/company/roboflow-ai/",
        "https://www.youtube.com/roboflow",
        "https://en.wikipedia.org/wiki/Roboflow",
        "https://www.wikidata.org/wiki/Q117062679",
        "https://www.crunchbase.com/organization/roboflow"
      ]
    },
    {
      "@type": "SoftwareApplication",
      "@id": "https://trackers.roboflow.com/#software",
      "name": "Roboflow Trackers",
      "description": "A unified library for multi-object tracking with clean-room implementations of SORT, ByteTrack, OC-SORT, and BoT-SORT, designed to plug into any detection model via the supervision library.",
      "applicationCategory": "DeveloperApplication",
      "applicationSubCategory": "Object Tracking",
      "featureList": ["SORT tracking", "ByteTrack tracking", "OC-SORT tracking", "HOTA evaluation", "IDF1 evaluation", "MOTA evaluation", "MOT17 dataset support", "SportsMOT dataset support"],
      "operatingSystem": "Linux, macOS, Windows",
      "url": "https://trackers.roboflow.com",
      "downloadUrl": "https://pypi.org/project/trackers/",
      "codeRepository": "https://github.com/roboflow/trackers",
      "programmingLanguage": "Python",
      "author": {
        "@id": "https://roboflow.com/#organization"
      },
      "offers": {
        "@type": "Offer",
        "price": "0",
        "priceCurrency": "USD"
      }
    }
  ]
}
</script>

{# ── WebSite + SearchAction JSON-LD (homepage only) ── #}
{% if page.url == '' or page.url == './' %}
{% set canonical_site_url = config.site_url | default('https://trackers.roboflow.com/latest/', true) %}
{% if not canonical_site_url.endswith('/') %}
{% set canonical_site_url = canonical_site_url ~ '/' %}
{% endif %}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "Roboflow Trackers",
  "url": "{{ canonical_site_url }}",
  "description": "Documentation for Roboflow Trackers — multi-object tracking library with SORT, ByteTrack, OC-SORT, and BoT-SORT implementations.",
  "potentialAction": {
    "@type": "SearchAction",
    "target": {
      "@type": "EntryPoint",
      "urlTemplate": "{{ canonical_site_url }}?q={search_term_string}"
    },
    "query-input": "required name=search_term_string"
  }
}
</script>
{% endif %}

{# ── Per-page TechArticle JSON-LD (injected by schema_inject.py hook) ── #}
{% if page.meta and page.meta.json_ld_article %}
<script type="application/ld+json">
{{ page.meta.json_ld_article | safe }}
</script>
{% endif %}

{# ── Per-page FAQPage JSON-LD (injected by schema_inject.py hook — homepage only) ── #}
{% if page.meta and page.meta.json_ld_faq %}
<script type="application/ld+json">
{{ page.meta.json_ld_faq | safe }}
</script>
{% endif %}

{# ── Per-page BreadcrumbList JSON-LD (injected by schema_inject.py hook) ── #}
{% if page.meta and page.meta.json_ld_breadcrumbs %}
<script type="application/ld+json">
{{ page.meta.json_ld_breadcrumbs | safe }}
</script>
{% endif %}

{# ── Per-page Dataset JSON-LD (injected by schema_inject.py hook — comparison page only) ── #}
{% if page.meta and page.meta.json_ld_datasets %}
{% for ds_json in page.meta.json_ld_datasets %}
<script type="application/ld+json">
{{ ds_json | safe }}
</script>
{% endfor %}
{% endif %}

{# ── Open Graph meta tags ── #}
<meta property="og:type" content="{% if page.url == '' or page.url == './' %}website{% else %}article{% endif %}" />
<meta property="og:site_name" content="Roboflow Trackers" />
<meta property="og:url" content="{{ page.canonical_url }}" />
<meta property="og:title" content="{% if page.meta and page.meta.title %}{{ page.meta.title }}{% else %}{{ page.title }} — Roboflow Trackers{% endif %}" />
<meta property="og:description" content="{% if page.meta and page.meta.description %}{{ page.meta.description }}{% else %}A unified library for multi-object tracking with SORT, ByteTrack, OC-SORT, and BoT-SORT.{% endif %}" />
<meta property="og:image" content="https://trackers.roboflow.com/assets/logo-trackers-violet.svg" />
<meta property="og:image:alt" content="Roboflow Trackers logo" />

{# ── IndexNow key (Bing/Yandex site ownership verification) ── #}
{# Key file: docs/bc061e8ae9e449d7acb9f86d29637e58.txt — must stay in sync with workflow + this tag #}
<meta name="indexnow-key" content="bc061e8ae9e449d7acb9f86d29637e58" />

{# ── Twitter / X Card meta tags ── #}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@roboflow" />
<meta name="twitter:title" content="{% if page.meta and page.meta.title %}{{ page.meta.title }}{% else %}{{ page.title }} — Roboflow Trackers{% endif %}" />
<meta name="twitter:description" content="{% if page.meta and page.meta.description %}{{ page.meta.description }}{% else %}A unified library for multi-object tracking with SORT, ByteTrack, OC-SORT, and BoT-SORT.{% endif %}" />
<meta name="twitter:image" content="https://trackers.roboflow.com/assets/logo-trackers-violet.svg" />

{% endif %}{# end if page #}
{% endblock %}
