46 lines
1.2 KiB
Django/Jinja
46 lines
1.2 KiB
Django/Jinja
{% if home %}
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "http://schema.org",
|
|
"@type": "WebSite",
|
|
"name": "{{ title }}",
|
|
"url": "{{ config.base_url }}",
|
|
"description": "{{ description }}",
|
|
"thumbnailUrl": "{{ config.base_url + "/logo.svg" }}",
|
|
}
|
|
</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 }},
|
|
"description": {{ description | striptags }},
|
|
"datePublished": {{ date_published }},
|
|
"dateModified": {{ date_modified }},
|
|
"author": {
|
|
"@type": "Person",
|
|
"name": {{ config.languages[language].author }},
|
|
"url": {{ config.base_url + "/" + language + "/about-author" }}
|
|
},
|
|
"publisher": {
|
|
"@type": "Organization",
|
|
"name": "{{ config.languages[language].title }}",
|
|
"url": {{ config.base_url }},
|
|
"logo": {
|
|
"@type": "ImageObject",
|
|
"url": {{ config.base_url + "/logo.svg" }}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
{% endif %} |