franca-theme-blog/templates/components/schema.j2

47 lines
1.2 KiB
Django/Jinja

{% if home %}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "{{ title }}",
"url": "{{ url }}",
"description": "{{ description }}",
"thumbnailUrl": "{{ logo_url }}",
}
</script>
{% else %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": {{ config.schema.type }},
{% if section %}
"articleSection": {{ translate(section, language) }},
{% endif %}
{% if config.schema.type == 'TechArticle' %}
"proficiencyLevel": "Beginner",
{% endif %}
"name": {{ title }},
"headline": {{ title }},
"inLanguage": {{ language }},
"wordCount": {{ wordcount }},
"description": {{ description }},
"datePublished": {{ date_published }},
"dateModified": {{ date_modified }},
"author": {
"@type": "Person",
"name": {{ config.languages[language].author }},
"url": {{ config.baseURL + "/" + language + "/about-author" }}
},
"publisher": {
"@type": "Organization",
"name": "{{ config.languages[language].title }}",
"url": {{ config.baseUrl }},
"logo": {
"@type": "ImageObject",
"url": {{ logo_url }}
}
}
}
</script>
{% endif %}