Skip to content

Commit 4c2d40a

Browse files
author
olaru
committed
FAQ generated for twigs, json-ld and .md files (still not all articles are covered)
1 parent 3824508 commit 4c2d40a

18 files changed

Lines changed: 799 additions & 357 deletions
Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,53 @@
11
<script type="application/ld+json">
22
{
33
"@context": "https://schema.org",
4-
"@type": "BlogPosting",
5-
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#article",
6-
"mainEntityOfPage": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}",
7-
"headline": "{{ article.title }}",
8-
"description": "{{ article.excerpt }}",
9-
"datePublished": "{{ article.postDate|date('c') }}",
10-
"dateModified": "{{ article.postDate|date('c') }}",
11-
"articleSection": "{{ article.category.name }}",
12-
"author": {
13-
"@type": "Person",
14-
"name": "{{ article.author.name }}",
15-
"url": "{{ absolute_url(path('page::author-resource', {slug: article.author.slug})) }}"
16-
},
17-
"publisher": {
18-
"@type": "Organization",
19-
"name": "Dotkernel",
20-
"url": "{{ absolute_url('/') }}",
21-
"logo": {
22-
"@type": "ImageObject",
23-
"url": "{{ absolute_url(asset('images/app/dotkernel-logo.png')) }}"
4+
"@graph": [
5+
{
6+
"@type": "TechArticle",
7+
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#article",
8+
"headline": {{ article.title|json_encode|raw }},
9+
"description": {{ article.excerpt|json_encode|raw }},
10+
"url": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}",
11+
"mainEntityOfPage": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}",
12+
"datePublished": "{{ article.postDate|date('c') }}",
13+
"dateModified": "{{ article.postDate|date('c') }}",
14+
"image": "{{ app.meta.image }}",
15+
"articleSection": {{ article.category.name|json_encode|raw }},
16+
"author": {
17+
"@type": "Person",
18+
"name": {{ article.author.name|json_encode|raw }},
19+
"url": "{{ absolute_url(path('page::author-resource', {slug: article.author.slug})) }}"
20+
},
21+
"publisher": {
22+
"@type": "Organization",
23+
"name": "Dotkernel",
24+
"url": "{{ absolute_url('/') }}",
25+
"logo": {
26+
"@type": "ImageObject",
27+
"url": "{{ absolute_url(asset('images/app/dotkernel-logo.png')) }}"
28+
}
29+
}
30+
},
31+
{
32+
"@type": "BreadcrumbList",
33+
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#breadcrumb",
34+
"itemListElement": [
35+
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{{ absolute_url('/') }}" },
36+
{ "@type": "ListItem", "position": 2, "name": {{ article.category.name|json_encode|raw }}, "item": "{{ absolute_url(path('page::category-resource', {slug: article.category.slug})) }}" },
37+
{ "@type": "ListItem", "position": 3, "name": {{ article.title|json_encode|raw }} }
38+
]
39+
},
40+
{
41+
"@type": "FAQPage",
42+
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#faq",
43+
"mainEntity": [
44+
{ "@type": "Question", "name": "Why did mobile detection change in DotKernel 1.6.0?", "acceptedAnswer": { "@type": "Answer", "text": "Because of the new Wurfl Cloud integration. This version no longer ships with a working built-in method for mobile detection, so it must be configured first." } },
45+
{ "@type": "Question", "name": "What are the steps to configure Wurfl Cloud detection?", "acceptedAnswer": { "@type": "Answer", "text": "Go to the scientiamobile website and register for a Wurfl Cloud account, choose the device_os and mobile_browser capabilities for the account and save, then go to API Keys and copy the key into application.ini." } },
46+
{ "@type": "Question", "name": "Why choose the device_os and mobile_browser capabilities specifically?", "acceptedAnswer": { "@type": "Answer", "text": "With these two capabilities, DotKernel's built-in methods can also derive extra capabilities such as isMobile, isSmartPhone, isIphone, isAndroid, isBlackberry, isSymbian, and isWindowsMobile. Choosing other capabilities from scientiamobile results in wrong detection of these extra capabilities." } },
47+
{ "@type": "Question", "name": "What happened to the old Dot_UserAgent_Wurfl class?", "acceptedAnswer": { "@type": "Answer", "text": "It was removed and replaced with the new Dot_UserAgent_WurflCloud class, which uses the Wurfl Cloud API adapter." } },
48+
{ "@type": "Question", "name": "What does the redirect setting in application.ini control?", "acceptedAnswer": { "@type": "Answer", "text": "When resources.useragent.wurflcloud.redirect is TRUE (the default), visitors from the frontend are redirected to the mobile module the first time a mobile device is detected." } }
49+
]
2450
}
25-
}
51+
]
2652
}
2753
</script>
Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,50 @@
11
<script type="application/ld+json">
22
{
33
"@context": "https://schema.org",
4-
"@type": "BlogPosting",
5-
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#article",
6-
"mainEntityOfPage": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}",
7-
"headline": "{{ article.title }}",
8-
"description": "{{ article.excerpt }}",
9-
"datePublished": "{{ article.postDate|date('c') }}",
10-
"dateModified": "{{ article.postDate|date('c') }}",
11-
"articleSection": "{{ article.category.name }}",
12-
"author": {
13-
"@type": "Person",
14-
"name": "{{ article.author.name }}",
15-
"url": "{{ absolute_url(path('page::author-resource', {slug: article.author.slug})) }}"
16-
},
17-
"publisher": {
18-
"@type": "Organization",
19-
"name": "Dotkernel",
20-
"url": "{{ absolute_url('/') }}",
21-
"logo": {
22-
"@type": "ImageObject",
23-
"url": "{{ absolute_url(asset('images/app/dotkernel-logo.png')) }}"
4+
"@graph": [
5+
{
6+
"@type": "TechArticle",
7+
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#article",
8+
"headline": {{ article.title|json_encode|raw }},
9+
"description": {{ article.excerpt|json_encode|raw }},
10+
"url": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}",
11+
"mainEntityOfPage": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}",
12+
"datePublished": "{{ article.postDate|date('c') }}",
13+
"dateModified": "{{ article.postDate|date('c') }}",
14+
"image": "{{ app.meta.image }}",
15+
"articleSection": {{ article.category.name|json_encode|raw }},
16+
"author": {
17+
"@type": "Person",
18+
"name": {{ article.author.name|json_encode|raw }},
19+
"url": "{{ absolute_url(path('page::author-resource', {slug: article.author.slug})) }}"
20+
},
21+
"publisher": {
22+
"@type": "Organization",
23+
"name": "Dotkernel",
24+
"url": "{{ absolute_url('/') }}",
25+
"logo": {
26+
"@type": "ImageObject",
27+
"url": "{{ absolute_url(asset('images/app/dotkernel-logo.png')) }}"
28+
}
29+
}
30+
},
31+
{
32+
"@type": "BreadcrumbList",
33+
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#breadcrumb",
34+
"itemListElement": [
35+
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{{ absolute_url('/') }}" },
36+
{ "@type": "ListItem", "position": 2, "name": {{ article.category.name|json_encode|raw }}, "item": "{{ absolute_url(path('page::category-resource', {slug: article.category.slug})) }}" },
37+
{ "@type": "ListItem", "position": 3, "name": {{ article.title|json_encode|raw }} }
38+
]
39+
},
40+
{
41+
"@type": "FAQPage",
42+
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#faq",
43+
"mainEntity": [
44+
{ "@type": "Question", "name": "How do you disable the automatic mobile redirect in DotKernel?", "acceptedAnswer": { "@type": "Answer", "text": "Starting with revision 408, set resources.useragent.wurflapi.redirect = false in application.ini. Per the article, this is also the default state of the redirect option." } },
45+
{ "@type": "Question", "name": "Where in the code is this configuration option checked?", "acceptedAnswer": { "@type": "Answer", "text": "In Controllers/frontend/IndexController.php (around line 19), a condition checks whether the redirect is enabled in application.ini, whether the visiting browser is mobile, and whether session->mobileHit isn't already set, before registering and redirecting the visit." } }
46+
]
2447
}
25-
}
48+
]
2649
}
2750
</script>
Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,53 @@
11
<script type="application/ld+json">
22
{
33
"@context": "https://schema.org",
4-
"@type": "BlogPosting",
5-
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#article",
6-
"mainEntityOfPage": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}",
7-
"headline": "{{ article.title }}",
8-
"description": "{{ article.excerpt }}",
9-
"datePublished": "{{ article.postDate|date('c') }}",
10-
"dateModified": "{{ article.postDate|date('c') }}",
11-
"articleSection": "{{ article.category.name }}",
12-
"author": {
13-
"@type": "Person",
14-
"name": "{{ article.author.name }}",
15-
"url": "{{ absolute_url(path('page::author-resource', {slug: article.author.slug})) }}"
16-
},
17-
"publisher": {
18-
"@type": "Organization",
19-
"name": "Dotkernel",
20-
"url": "{{ absolute_url('/') }}",
21-
"logo": {
22-
"@type": "ImageObject",
23-
"url": "{{ absolute_url(asset('images/app/dotkernel-logo.png')) }}"
4+
"@graph": [
5+
{
6+
"@type": "TechArticle",
7+
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#article",
8+
"headline": {{ article.title|json_encode|raw }},
9+
"description": {{ article.excerpt|json_encode|raw }},
10+
"url": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}",
11+
"mainEntityOfPage": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}",
12+
"datePublished": "{{ article.postDate|date('c') }}",
13+
"dateModified": "{{ article.postDate|date('c') }}",
14+
"image": "{{ app.meta.image }}",
15+
"articleSection": {{ article.category.name|json_encode|raw }},
16+
"author": {
17+
"@type": "Person",
18+
"name": {{ article.author.name|json_encode|raw }},
19+
"url": "{{ absolute_url(path('page::author-resource', {slug: article.author.slug})) }}"
20+
},
21+
"publisher": {
22+
"@type": "Organization",
23+
"name": "Dotkernel",
24+
"url": "{{ absolute_url('/') }}",
25+
"logo": {
26+
"@type": "ImageObject",
27+
"url": "{{ absolute_url(asset('images/app/dotkernel-logo.png')) }}"
28+
}
29+
}
30+
},
31+
{
32+
"@type": "BreadcrumbList",
33+
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#breadcrumb",
34+
"itemListElement": [
35+
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{{ absolute_url('/') }}" },
36+
{ "@type": "ListItem", "position": 2, "name": {{ article.category.name|json_encode|raw }}, "item": "{{ absolute_url(path('page::category-resource', {slug: article.category.slug})) }}" },
37+
{ "@type": "ListItem", "position": 3, "name": {{ article.title|json_encode|raw }} }
38+
]
39+
},
40+
{
41+
"@type": "FAQPage",
42+
"@id": "{{ absolute_url(path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug})) }}#faq",
43+
"mainEntity": [
44+
{ "@type": "Question", "name": "What does the name \"DotKernel\" mean?", "acceptedAnswer": { "@type": "Answer", "text": "It combines \"Dot\", as a representation of the Internet, with \"Kernel\", the quintessence of any IT application, reflecting the aim of being a central part of Internet development." } },
45+
{ "@type": "Question", "name": "What is DotKernel 1?", "acceptedAnswer": { "@type": "Answer", "text": "A PHP Application Framework built on top of Zend Framework 1, first publicly released in July 2010, with an architecture based on MVC. Its latest version is 1.8 Long Term Support, which per the article will not be followed by a new version, only bugfixes." } },
46+
{ "@type": "Question", "name": "What is DotKernel 3?", "acceptedAnswer": { "@type": "Answer", "text": "A collection of PSR-7 Middleware applications built on top of the Zend Expressive microframework, composed of a set of custom and extended Zend Framework 3 components, with an architecture based on Middleware. It implements PSR-1, PSR-2, PSR-4, PSR-7, and PSR-11." } },
47+
{ "@type": "Question", "name": "How many applications make up DotKernel 3?", "acceptedAnswer": { "@type": "Answer", "text": "At the time of the article, there were two available applications, Frontend and Admin, with a third one, API, under development." } },
48+
{ "@type": "Question", "name": "When someone writes just \"DotKernel\", which version is meant?", "acceptedAnswer": { "@type": "Answer", "text": "In posts older than 2017, \"DotKernel\" referred to DotKernel 1, since it was the only version. Since the release of DotKernel 3, \"DotKernel\" refers to DotKernel 3, and all future references to DotKernel 1 are made explicitly." } }
49+
]
2450
}
25-
}
51+
]
2652
}
2753
</script>

0 commit comments

Comments
 (0)