OG and Rich Snippets.
This commit is contained in:
parent
c2d323d09f
commit
c6255cf531
6 changed files with 85 additions and 0 deletions
23
templates/partial/jsonld_article.html
Normal file
23
templates/partial/jsonld_article.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% if SITELOGO %}
|
||||
{% set default_cover = SITELOGO %}
|
||||
{% else %}
|
||||
{% set default_cover = '{{ SITEURL }}/theme/img/profile.png' %}
|
||||
{% endif %}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"name": "{{ article.title }}",
|
||||
"headline": "{{ article.title }}",
|
||||
"datePublished": "{{ article.date }}",
|
||||
"dateModified": "{{ article.modified }}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ article.author.name }}",
|
||||
"url": "{{ SITEURL }}/{{ article.author.url }}"
|
||||
},
|
||||
"image": "{{ article.metadata.get('cover', default_cover) }}",
|
||||
"url": "{{ SITEURL }}/{{ article.url }}",
|
||||
"description": "{{ article.summary|striptags }}"
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue