Add support for SEO Pelican plugin
This commit is contained in:
parent
2fc69e12ef
commit
73bc9aac05
5 changed files with 79 additions and 69 deletions
|
@ -1,23 +1,25 @@
|
|||
{% if SITELOGO %}
|
||||
{% set default_cover = SITELOGO %}
|
||||
{% else %}
|
||||
{% set default_cover = '{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png' %}
|
||||
{% if not PLUGINS or 'seo' not in PLUGINS %}
|
||||
{% if SITELOGO %}
|
||||
{% set default_cover = SITELOGO %}
|
||||
{% else %}
|
||||
{% set default_cover = '{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png' %}
|
||||
{% endif %}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"name": "{{ article.title|striptags }}",
|
||||
"headline": "{{ article.title|striptags }}",
|
||||
"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>
|
||||
{% endif %}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"name": "{{ article.title|striptags }}",
|
||||
"headline": "{{ article.title|striptags }}",
|
||||
"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