1
0
mirror of https://github.com/privacyguides/privacyguides.org.git synced 2025-07-02 17:42:39 +00:00

Implement structured data

Closes #64
This commit is contained in:
2021-09-15 09:26:44 -05:00
parent a04a293e97
commit 5441f4ab95
3 changed files with 36 additions and 0 deletions

View File

@ -2,6 +2,24 @@
layout: default
---
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Article",
"headline": "{{ page.title }}",
"description": "{{ page.excerpt }}",
"datePublished": "{{ page.date }}",
"publisher": {{ site.data.schema.organization | jsonify }},
"url": "{{ page.url | prepend: site.url }}",
"author": [
{% for author in page.author %}{"@type": "Person",
"name": "{{ author }}"
}{% unless forloop.last %}, {% endunless %}{% endfor %}
]
{% if page.cover %}, "image": "/assets/img/blog/{{ page.cover }}"{% endif %}
}
</script>
<div class="p-5 mb-3 text-light bg-700"{% if page.cover %} style="background-image: {{ page.color | default: "linear-gradient(to bottom, rgba(40, 50, 63, 0.3), rgba(40, 50, 63, 0.9))" }}, url(/assets/img/blog/{{ page.cover }}); background-size: cover; background-position: center;"{% endif %}>
<div class="container">
<div class="post-cover">