article jsonld
This commit is contained in:
parent
5a64788339
commit
fed6fc374d
42
jsonld_templates/blog_post.jsonld
Normal file
42
jsonld_templates/blog_post.jsonld
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"@context": "http://schema.org",
|
||||||
|
"@type": "BlogPosting",
|
||||||
|
"url": "{{url}}",
|
||||||
|
"headline": "{{title}}",
|
||||||
|
"dateCreated": "{{date}}T00:00:00",
|
||||||
|
"datePublished": "{{date}}T00:00:00",
|
||||||
|
"dateModified": "{{date}}T00:00:00",
|
||||||
|
"inLanguage": "en-CA",
|
||||||
|
"isFamilyFriendly": "true",
|
||||||
|
"accountablePerson": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "Evan Pratten",
|
||||||
|
"url": "https://va3zza.com"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "Evan Pratten",
|
||||||
|
"url": "https://va3zza.com"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "Evan Pratten",
|
||||||
|
"url": "https://va3zza.com"
|
||||||
|
},
|
||||||
|
"publisher": {
|
||||||
|
"@type": "Organization",
|
||||||
|
"name": "Evan Pratten",
|
||||||
|
"url": "https://va3zza.com",
|
||||||
|
"logo": {
|
||||||
|
"@type": "ImageObject",
|
||||||
|
"url": "{{profile_pic}}",
|
||||||
|
"width": "460",
|
||||||
|
"height": "460"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mainEntityOfPage": "True",
|
||||||
|
"keywords": [],
|
||||||
|
"genre": [],
|
||||||
|
"articleSection": "Blog Post",
|
||||||
|
"articleBody": "{{content}}"
|
||||||
|
}
|
@ -26,24 +26,7 @@ MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], displayMat
|
|||||||
<meta property="og:description" content="{{config.description}}" />
|
<meta property="og:description" content="{{config.description}}" />
|
||||||
<meta property="description" content="{{config.description}}" />
|
<meta property="description" content="{{config.description}}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<meta property="article:published_time" content="{{page.date}}T00:00:00+00:00" />
|
<meta property="article:published_time" content="{{page.date}}T00:00:00" />
|
||||||
|
|
||||||
{# Handle article listing #}
|
|
||||||
<script type="application/ld+json">
|
|
||||||
{
|
|
||||||
"@context": "https://schema.org",
|
|
||||||
"@type": "NewsArticle",
|
|
||||||
"headline": "{{page.title}}",
|
|
||||||
"datePublished": "{{page.date}}T00:00:00+00:00",
|
|
||||||
"author": [{
|
|
||||||
"@type": "Person",
|
|
||||||
"name": "Evan Pratten",
|
|
||||||
"url": "https://va3zza.com"
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{# Handle auto-centering request #}
|
{# Handle auto-centering request #}
|
||||||
{% if page.extra.auto_center_images %}
|
{% if page.extra.auto_center_images %}
|
||||||
@ -55,6 +38,23 @@ MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], displayMat
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{# Handle loading JSONLD #}
|
||||||
|
{% if page.extra.is_rfc or page.description and page.date %}
|
||||||
|
<script type="application/ld+json">
|
||||||
|
{# Import our template file #}
|
||||||
|
{% set template = load_data(path="jsonld_templates/blog_post.jsonld") %}
|
||||||
|
{# Now we can fill in any additional data #}
|
||||||
|
{{ template |
|
||||||
|
replace(from="{{url}}", to=config.base_url ~ page.path) |
|
||||||
|
replace(from="{{title}}", to=page.title) |
|
||||||
|
replace(from="{{date}}", to=page.date) |
|
||||||
|
replace(from="{{profile_pic}}", to=config.extra.profile_photo) |
|
||||||
|
replace(from="{{content}}", to=page.content | striptags | linebreaksbr) |
|
||||||
|
safe
|
||||||
|
}}
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
{% endblock head %}
|
{% endblock head %}
|
||||||
|
|
||||||
{% block profile %}
|
{% block profile %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user