Hello, as in the topic, I added all structure data for my sites but have left blog sites generated by collections for single blog posts and single gallery sites. How can I add structure data for every individual blog?
Should I create some sort of variables or any kind of dynamic data with ( {{ title }}
, {{ author }}
, {{ publish_date }}
, {{ image_url }}
, {{ content }}
, i {{ url }}
)? is it possible and how?
Pakic
August 2, 2024, 5:08pm
2
You can right click on single page of blog > settings.
Then go to schema markup, and create new schema, now inside of schema you can custom write variables similary to what you wrote above.
In screenshot below you can see examples, they I am using variables to get dynamic content from CMS such as:
${page->get('data')->get('description')}
Theres more explained here:
Learn how to manage dynamic data in Divhunt using a unified variable sharing system. Discover where you can apply variables, such as text content, images, attributes, and more, across various features including CMS, REST API, and future integrations...
1 Like
Thanks a lot this will help me !
Will add examples from my site, maybe someone will be happy about it
for single blog post:
{
“@context ”: “https://schema.org ”,
“@type ”: “BlogPosting”,
“mainEntityOfPage”: {
“@type ”: “WebPage”,
“@id ”: “${page->get(‘data’)->get(‘id’)}”,
“url”: “https://www.wytwornia-zieleni.pl/blog/${page->get(‘data’)->get(‘slug’)} ”
},
“headline”: “${page->get(‘data’)->get(‘seo’)->get(‘title’)}”,
“description”: “${page->get(‘data’)->get(‘seo’)->get(‘description’)}”,
“image”: “${page->get(‘data’)->get(‘seo’)->get(‘cover’)->get(‘file’)}”,
“author”: {
“@type ”: “Person”,
“name”: “Wojciech Kazimierowicz”
},
“publisher”: {
“@type ”: “Organization”,
“name”: “Wytwórnia Zieleni”,
“logo”: {
“@type ”: “ImageObject”,
“url”: “https://global.divhunt.com/a67b47fe98589e135c4e1b506482bec4_21516.png ”
}
},
“datePublished”: “${page->get(‘data-publikacji’)->date(‘D M Y’)}”
}
For single gallery page (nasze-realizacje)
{
“@context ”: “https://schema.org ”,
“@type ”: “BlogPosting”,
“mainEntityOfPage”: {
“@type ”: “WebPage”,
“@id ”: “${page->get(‘data’)->get(‘id’)}”,
“url”: “https://www.wytwornia-zieleni.pl/blog/${page->get(‘data’)->get(‘slug’)} ”
},
“headline”: “${page->get(‘data’)->get(‘seo’)->get(‘title’)}”,
“description”: “${page->get(‘data’)->get(‘seo’)->get(‘description’)}”,
“image”: “${page->get(‘data’)->get(‘seo’)->get(‘cover’)->get(‘file’)}”,
“author”: {
“@type ”: “Person”,
“name”: “Wojciech Kazimierowicz”
},
“publisher”: {
“@type ”: “Organization”,
“name”: “Wytwórnia Zieleni”,
“logo”: {
“@type ”: “ImageObject”,
“url”: “https://global.divhunt.com/a67b47fe98589e135c4e1b506482bec4_21516.png ”
}
},
“datePublished”: “${page->get(‘data-publikacji’)->date(‘D M Y’)}”
}
1 Like
system
Closed
August 4, 2024, 7:52pm
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.