File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed
tbx/project_styleguide/templates/patterns Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 11{% load wagtailcore_tags %}
2- {% wagtail_site as current_site %}
32{% if page.breadcrumbs %}
43 < script type ="application/ld+json ">
54 {
109 "@type" : "ListItem" ,
1110 "position" : { { forloop. counter } } ,
1211 "name" : "{% if crumb.depth == 2 %}Home{% else %}{{ crumb.title|escapejs }}{% endif %}" ,
13- "item" : "{{ current_site.root_url }}{% pageurl crumb %}"
12+ "item" : "{% fullpageurl crumb %}"
1413 } { % if not forloop . last % } , { % endif % } { % endfor % }
1514 ]
1615 }
Original file line number Diff line number Diff line change 1+ {% load wagtailcore_tags wagtailimages_tags %}
2+ < script type ="application/ld+json ">
3+ {
4+ "@context" : "https://schema.org" ,
5+ "@type" : "BlogPosting" ,
6+ "mainEntityOfPage" : {
7+ "@type" : "WebPage" ,
8+ "@id" : "{% fullpageurl page %}"
9+ } ,
10+ "headline" : "{{ page.title|escapejs }}" ,
11+ "description" : "{% if page.search_description %}{{ page.search_description|escapejs }}{% elif page.listing_summary %}{{ page.listing_summary|escapejs }}{% endif %}" { % if page . feed_image % } ,
12+ "image" : "{% image page.feed_image format-webp width-1200 as blog_image %}{{ blog_image.url }}" { % endif % } { % if page . first_author % } ,
13+ "author" : {
14+ "@type" : "Person" ,
15+ "name" : "{{ page.first_author.name|escapejs }}" { % if page . first_author . person_page % } ,
16+ "url" : "{% fullpageurl page.first_author.person_page %}" { % endif % }
17+ } { % endif % } ,
18+ "publisher" : {
19+ "@type" : "Organization" ,
20+ "name" : "Torchbox" ,
21+ "logo" : {
22+ "@type" : "ImageObject" ,
23+ "url" : "{% wagtail_site as current_site %}{{ current_site.root_url }}/apple-touch-icon.png"
24+ }
25+ } ,
26+ "datePublished" : "{{ page.date|date:'Y-m-d' }}" ,
27+ "dateModified" : "{% if page.last_published_at %}{{ page.last_published_at|date:'Y-m-d' }}{% else %}{{ page.date|date:'Y-m-d' }}{% endif %}"
28+ }
29+ </ script >
Original file line number Diff line number Diff line change 2222 {{ block.super }}
2323{% endblock %}
2424
25+ {% block extra_jsonld %}
26+ {% include "patterns/pages/blog/blog-posting-jsonld.html" %}
27+ {% endblock %}
28+
2529{% block content %}
2630 < div class ="grid grid--spacer-large streamfield lg:relative ">
2731 < div class ="authors ">
You can’t perform that action at this time.
0 commit comments