|
| 1 | +{% extends "base.html" %} |
| 2 | + |
| 3 | +{# |
| 4 | + Theme override for SEO structured data and a clean homepage <title>. |
| 5 | + Schema is gated on page.file.src_path. Homepage uses a connected @graph |
| 6 | + (WebSite + SoftwareSourceCode + Organization) per schema review. |
| 7 | +#} |
| 8 | + |
| 9 | +{% block htmltitle %} |
| 10 | + {%- if page and page.file and page.file.src_path == "index.md" -%} |
| 11 | + <title>PyTorch-Wildlife: Open-Source Conservation Deep Learning Framework | Microsoft AI for Good</title> |
| 12 | + {%- else -%} |
| 13 | + {{ super() }} |
| 14 | + {%- endif -%} |
| 15 | +{% endblock %} |
| 16 | + |
| 17 | +{% block extrahead %} |
| 18 | + {{ super() }} |
| 19 | + |
| 20 | + {%- set social_title = page.meta.title if page and page.meta and page.meta.title else (page.title if page and page.title else config.site_name) -%} |
| 21 | + {%- set social_desc = page.meta.description if page and page.meta and page.meta.description else config.site_description -%} |
| 22 | + <meta property="og:type" content="website"> |
| 23 | + <meta property="og:site_name" content="{{ config.site_name }}"> |
| 24 | + <meta property="og:title" content="{{ social_title | striptags }}"> |
| 25 | + <meta property="og:description" content="{{ social_desc | striptags }}"> |
| 26 | + <meta property="og:url" content="{{ page.canonical_url if page and page.canonical_url else config.site_url }}"> |
| 27 | + <meta property="og:image" content="{{ config.site_url }}assets/cat.png"> |
| 28 | + <meta property="og:image:alt" content="PyTorch-Wildlife: open-source conservation deep learning framework by Microsoft AI for Good Lab"> |
| 29 | + <meta name="twitter:card" content="summary_large_image"> |
| 30 | + <meta name="twitter:title" content="{{ social_title | striptags }}"> |
| 31 | + <meta name="twitter:description" content="{{ social_desc | striptags }}"> |
| 32 | + <meta name="twitter:image" content="{{ config.site_url }}assets/cat.png"> |
| 33 | + <meta name="twitter:image:alt" content="PyTorch-Wildlife: open-source conservation deep learning framework by Microsoft AI for Good Lab"> |
| 34 | + {#- TODO(design): swap in a 1200x630 banner + add og:image:width/height when delivered -#} |
| 35 | + |
| 36 | + {%- if page and page.file and page.file.src_path == "index.md" %} |
| 37 | + <script type="application/ld+json"> |
| 38 | + {{- { |
| 39 | + "@context": "https://schema.org", |
| 40 | + "@graph": [ |
| 41 | + { |
| 42 | + "@type": "WebSite", |
| 43 | + "@id": config.site_url ~ "#website", |
| 44 | + "url": config.site_url, |
| 45 | + "name": config.site_name, |
| 46 | + "inLanguage": "en", |
| 47 | + "description": config.site_description, |
| 48 | + "publisher": { "@id": "https://www.microsoft.com/en-us/ai/ai-for-good#organization" } |
| 49 | + }, |
| 50 | + { |
| 51 | + "@type": "SoftwareSourceCode", |
| 52 | + "@id": config.site_url ~ "#software", |
| 53 | + "name": config.site_name, |
| 54 | + "description": config.site_description, |
| 55 | + "url": config.site_url, |
| 56 | + "mainEntityOfPage": config.site_url, |
| 57 | + "codeRepository": config.repo_url, |
| 58 | + "programmingLanguage": "Python", |
| 59 | + "runtimePlatform": "Python", |
| 60 | + "isAccessibleForFree": true, |
| 61 | + "license": "https://github.com/microsoft/Pytorch-Wildlife/blob/main/LICENSE", |
| 62 | + "creator": { "@id": "https://www.microsoft.com/en-us/ai/ai-for-good#organization" }, |
| 63 | + "maintainer": { "@id": "https://www.microsoft.com/en-us/ai/ai-for-good#organization" }, |
| 64 | + "sameAs": ["https://github.com/microsoft/Pytorch-Wildlife", "https://pypi.org/project/PytorchWildlife/", "https://arxiv.org/abs/2405.12930"], |
| 65 | + "keywords": ["PyTorch-Wildlife", "wildlife AI framework", "conservation deep learning framework", "wildlife model zoo", "camera trap detection", "species classification"] |
| 66 | + }, |
| 67 | + { |
| 68 | + "@type": "Organization", |
| 69 | + "@id": "https://www.microsoft.com/en-us/ai/ai-for-good#organization", |
| 70 | + "name": "Microsoft AI for Good Lab", |
| 71 | + "url": "https://www.microsoft.com/en-us/ai/ai-for-good" |
| 72 | + } |
| 73 | + ] |
| 74 | + } | tojson -}} |
| 75 | + </script> |
| 76 | + {%- endif %} |
| 77 | + |
| 78 | + {%- if page and page.file and page.file.src_path != "index.md" and page.canonical_url %} |
| 79 | + <script type="application/ld+json"> |
| 80 | + {{- { |
| 81 | + "@context": "https://schema.org", |
| 82 | + "@type": "BreadcrumbList", |
| 83 | + "itemListElement": [ |
| 84 | + { "@type": "ListItem", "position": 1, "name": "PyTorch-Wildlife", "item": config.site_url }, |
| 85 | + { "@type": "ListItem", "position": 2, "name": page.title | striptags, "item": page.canonical_url } |
| 86 | + ] |
| 87 | + } | tojson -}} |
| 88 | + </script> |
| 89 | + {%- endif %} |
| 90 | +{% endblock %} |
0 commit comments