Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/Blog/templates/page/JSON-LD/author-resource.jsonld.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@
},
"hasPart": {
"@type": "ItemList",
"name": "Blog posts by {{ author.name }}",
"description": "A list of blog posts written by {{ author.name }}.",
"numberOfItems": {{ data.items|length }},
"itemListElement": [
{% for post in data.items %}{% if not loop.first %},{% endif %}
{
"@type": "ListItem",
"position": {{ loop.index }},
"url": "{{ app.url ~ path('page::blog-resource', {categorySlug: post.category.slug, slug: post.slug}) }}",
"name": "{{ post.title }}"
"item": {
"@type": "BlogPosting",
"headline": "{{ post.title }}",
"url": "{{ app.url ~ path('page::blog-resource', {categorySlug: post.category.slug, slug: post.slug}) }}"
}
}
{% endfor %}
]
Expand Down
10 changes: 7 additions & 3 deletions src/Blog/templates/page/JSON-LD/authors.jsonld.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"@context": "https://schema.org",
"@type": "CollectionPage",
"@id": "{{ app.url ~ path('page::authors') }}#webpage",
"url": "{{ app.url ~ path('page::authors') }}",
"name": "Authors",
"description": "Browse Dotkernel blog posts by author.",
"url": "{{ app.url ~ path('page::authors') }}",
"numberOfItems": {{ authors|length }},
"isPartOf": { "@id": "{{ app.url }}#website" },
"mainEntity": {
"@type": "ItemList",
Expand All @@ -14,8 +15,11 @@
{
"@type": "ListItem",
"position": {{ loop.index }},
"url": "{{ app.url ~ path('page::author-resource', {slug: author.slug}) }}",
"name": "{{ author.name }}"
"item": {
"@type": "Person",
"url": "{{ app.url ~ path('page::author-resource', {slug: author.slug}) }}",
"name": "{{ author.name }}"
}
}
{% endfor %}
]
Expand Down
29 changes: 17 additions & 12 deletions src/Blog/templates/page/JSON-LD/blog.jsonld.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,27 @@
"@context": "https://schema.org",
"@type": "CollectionPage",
"@id": "{{ app.url ~ path('page::blog') }}#webpage",
"url": "{{ app.url ~ path('page::blog') }}",
"name": "Blog",
"description": "Latest articles from the Dotkernel blog.",
"url": "{{ app.url ~ path('page::blog') }}",
"numberOfItems": {{ data.items|length }},
"isPartOf": { "@id": "{{ app.url }}#website" },
"mainEntity": {
"@type": "ItemList",
"itemListElement": [
{% for article in data.items %}{% if not loop.first %},{% endif %}
{
"@type": "ListItem",
"position": {{ loop.index }},
"itemListElement": [
{% for article in data.items %}{% if not loop.first %},{% endif %}
{
"@type": "ListItem",
"position": {{ loop.index }},
"item": {
"@type": "BlogPosting",
"url": "{{ app.url ~ path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug}) }}",
"name": "{{ article.title }}"
"headline": "{{ article.title }}",
"author": {
"@type": "Person",
"name": "{{ article.author.name }}"
}
}
{% endfor %}
]
}
}
{% endfor %}
]
}
</script>
23 changes: 12 additions & 11 deletions src/Blog/templates/page/JSON-LD/categories.jsonld.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
"@context": "https://schema.org",
"@type": "CollectionPage",
"@id": "{{ app.url ~ path('page::categories') }}#webpage",
"url": "{{ app.url ~ path('page::categories') }}",
"name": "Categories",
"description": "Browse Dotkernel blog posts by category.",
"url": "{{ app.url ~ path('page::categories') }}",
"numberOfItems": {{ categories|length }},
"isPartOf": { "@id": "{{ app.url }}#website" },
"mainEntity": {
"@type": "ItemList",
"itemListElement": [
{% for category in categories %}{% if not loop.first %},{% endif %}
{
"@type": "ListItem",
"position": {{ loop.index }},
"itemListElement": [
{% for category in categories %}{% if not loop.first %},{% endif %}
{
"@type": "ListItem",
"position": {{ loop.index }},
"item": {
"@type": "CollectionPage",
"url": "{{ app.url ~ path('page::category-resource', {slug: category.slug}) }}",
"name": "{{ category.name }}"
}
{% endfor %}
]
}
}
{% endfor %}
]
}
</script>
16 changes: 13 additions & 3 deletions src/Blog/templates/page/JSON-LD/category-resource.jsonld.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,28 @@
"@context": "https://schema.org",
"@type": "CollectionPage",
"@id": "{{ app.url ~ path('page::category-resource', {slug: category.slug}) }}#webpage",
"url": "{{ app.url ~ path('page::category-resource', {slug: category.slug}) }}",
"name": "{{ category.name }}",
"description": "Blog posts from the '{{ category.name }}' category.",
"url": "{{ app.url ~ path('page::category-resource', {slug: category.slug}) }}",
"isPartOf": { "@id": "{{ app.url }}#website" },
"mainEntity": {
"@type": "ItemList",
"name": "Posts in '{{ category.name }}'",
"numberOfItems": {{ data.items|length }},
"itemListElement": [
{% for article in data.items %}{% if not loop.first %},{% endif %}
{
"@type": "ListItem",
"position": {{ loop.index }},
"url": "{{ app.url ~ path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug}) }}",
"name": "{{ article.title }}"
"item": {
"@type": "BlogPosting",
"url": "{{ app.url ~ path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug}) }}",
"heading": "{{ article.title }}",
"author": {
"@type": "Person",
"name": "{{ article.author.name }}"
}
}
}
{% endfor %}
]
Expand Down
30 changes: 18 additions & 12 deletions src/Blog/templates/page/JSON-LD/tag-resource.jsonld.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@
"@context": "https://schema.org",
"@type": "CollectionPage",
"@id": "{{ app.url ~ path('page::tag-resource', {slug: tag.slug}) }}#webpage",
"url": "{{ app.url ~ path('page::tag-resource', {slug: tag.slug}) }}",
"name": "{{ tag.name }}",
"description": "Blog posts that contain the '{{ category.name }}' tag.",
"url": "{{ app.url ~ path('page::tag-resource', {slug: tag.slug}) }}",
"numberOfItems": {{ data.items|length }},
"isPartOf": { "@id": "{{ app.url }}#website" },
"mainEntity": {
"@type": "ItemList",
"itemListElement": [
{% for article in data.items %}{% if not loop.first %},{% endif %}
{
"@type": "ListItem",
"position": {{ loop.index }},
"itemListElement": [
{% for article in data.items %}{% if not loop.first %},{% endif %}
{
"@type": "ListItem",
"position": {{ loop.index }},
"item": {
"@type": "BlogPosting",
"url": "{{ app.url ~ path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug}) }}",
"name": "{{ article.title }}"
"headline": "{{ article.title }}",
"author": {
"@type": "Person",
"name": "{{ article.author.name }}"
}
}
{% endfor %}
]
}
}
{% endfor %}
]
}
</script>