ClickHouse/website/templates/docs/ld_json.html
Ivan Blinkov 9a26d48ad0
Basic blog similar to docs (#11609)
* Basic blog similar to docs

* rename post

* no post content in post_meta

* update readme and template

* more "en" content

* complete "en" content

* build blog redirects

* redirects for migration

* link sitemaps

* update po

* add "ru" content

* ru redirects

* remove old domain mentions

* adjust styles

* content improvements

* +1 alt

* use main images from CDN

* use re-hosted in-content images

* extra vertical margin around embedded youtube

* minor improvements

* adjust post page

* adjust html meta

* adjust post page

* improve blog rendering
2020-06-16 09:31:00 +03:00

39 lines
1.2 KiB
HTML

{% if page and page.meta %}
<script type="application/ld+json">[{
"@context": "http://schema.org",
"@type": "{% if is_blog %}BlogPosting{% else %}TechArticle{% endif %}",
"headline": "{{ title }}",
"mainEntityOfPage": "{{ url or 'https://clickhouse.tech/' }}",
{% if page.meta.date %}
"datePublished": "{{ page.meta.date }}",
"dateModified": "{{ page.meta.date }}",
{% else %}
{% if page.meta.published_date %}"datePublished": "{{ page.meta.published_date.isoformat() }}",{% endif %}
{% if page.meta.modified_date %}"dateModified": "{{ page.meta.modified_date.isoformat() }}",{% endif %}
{% endif %}
"image": "{{ page.meta.image or 'https://clickhouse.tech/images/logo-209x60.png' }}",
"author": {
"@type": "Project",
"name": "ClickHouse"
},
"publisher": {
"@type": "Organization",
"name": "Yandex LLC",
"logo": {
"@type": "ImageObject",
"url": "https://clickhouse.tech/images/yandex.png",
"width": 163,
"height": 60
}
}}{% if not is_blog %}, {
"@context": "http://schema.org",
"@type": "Episode",
"name": "{{ title }}",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": RATING_VALUE,
"ratingCount": RATING_COUNT
}
}{% endif %}]</script>
{% endif %}