1
0
Fork 0
older-tomato-theme/jekyll_theme/_includes/seo.html
2023-12-17 08:21:01 +03:00

67 lines
2.7 KiB
HTML

<!-- begin seo template -->
<title>{{ page.title }}</title>
<meta name="description" content="{{ page.description }}">
{%- if page.tags %}
<meta name="keywords" content="{{ page.tags | join: ',' }}">
{%- endif %}
<link rel="canonical" href="{{ site.url | append: page.canonical_url }}">
<meta property="og:type" content="{% if page.date %}article{% else %}website{% endif %}">
<meta property="og:title" content="{{ page.title }}">
<meta property="og:locale" content="{{ page.lang | default: 'ru' }}">
<meta property="og:description" content="{{ page.description }}">
<meta property="og:url" content="{{ site.url | append: page.canonical_url }}">
<meta property="og:image" content="{{ site.url | append: '/img/older-tomato.jpg' }}">
<script type="application/ld+json">
{
"@context":"https://schema.org",
"@type":"{% if page.date %}BlogPosting{% else %}Blog{% endif %}",
"headline":"{{ page.title }}",
"description":"{{ page.description }}",
"url":"{{ site.url | append: page.canonical_url }}",
"image":"{{ site.url | append: '/img/older-tomato.jpg' }}",
"keywords":"{{ page.tags | join: ','}}",
{%- if page.date %}
"articleSection":"{{ page.sections | join: ','}}",
"dateCreated":"{{ page.date | date_to_xmlschema }}",
"datePublished":"{{ page.date | date_to_xmlschema }}",
{%- endif %}
"dateModified":"{{ site.time | date_to_xmlschema }}",
"author": {
"@type":"Person",
{%- if page.lang == site.lang %}
"name":"{{ page.author | default: site.author }}",
{%- else %}
"name":"{{ page.author | default: site.author_translated }}",
{%- endif %}
"url":"{{ site.homepage_url }}"
},
{%- if page.url_translated %}
{%- if page.lang == site.lang %}
"workTranslation": {
"@type":"{% if page.date %}BlogPosting{% else %}Blog{% endif %}",
"@id":"{{ site.url | append: page.url_translated }}",
"headline":"{{ page.title_translated }}",
"image":"{{ site.url | append: '/img/older-tomato.jpg' }}",
"inLanguage":"{{ page.lang | default: 'en' }}",
"author": {
"@type":"Person",
"name":"{{ page.author_translated | default: site.author_translated }}",
"url":"{{ site.homepage_url }}"
{%- else %}
"translationOfWork": {
"@type":"{% if page.date %}BlogPosting{% else %}Blog{% endif %}",
"@id":"{{ site.url | append: page.url_translated }}",
"headline":"{{ page.title_translated }}",
"image":"{{ site.url | append: '/img/older-tomato.jpg' }}",
"inLanguage":"{{ site.lang | default: 'ru' }}",
"author": {
"@type":"Person",
"name":"{{ page.author_translated | default: site.author }}",
"url":"{{ site.homepage_url }}"
{%- endif %}
}
},
{%- endif %}
"inLanguage":"{{ page.lang | default: 'ru' }}"
}</script>
<!-- end seo template -->