Skip to content

Commit a2c9792

Browse files
committed
jsonld for each twig file
1 parent 0e4bddf commit a2c9792

182 files changed

Lines changed: 439 additions & 5 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

public/index.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
declare(strict_types=1);
4-
54
use Mezzio\Application;
65
use Psr\Container\ContainerInterface;
76

public/llms.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Dotkernel Light
2+
3+
> Dotkernel Light is the technical blog for the Dotkernel headless PHP platform — a PSR-15 compliant application built on Mezzio and Laminas components. It publishes architecture write-ups, how-tos, and release notes for Dotkernel Admin, API, Frontend, and Light.
4+
5+
Content spans foundational PHP/middleware architecture (PSR-7, PSR-15, request lifecycle, dependency injection), practical how-tos (Doctrine migrations, CORS, authentication, caching), and the history/release notes of the Dotkernel ecosystem going back to 2008. Posts are organized by category and attributed to an author; URLs follow the pattern `/{category-slug}/{post-slug}/`.
6+
7+
## Docs
8+
9+
- [Blog](https://new.dotkernel.com/blog/): full list of posts, most recent first, paginated
10+
- [Categories](https://new.dotkernel.com/categories/): all categories with post counts
11+
- [About](https://new.dotkernel.com/about/): what Dotkernel Light is
12+
- [Who We Are](https://new.dotkernel.com/who-we-are/): team/company background
13+
- [OSS Package Lifecycle](https://new.dotkernel.com/dotkernel-packages-oss-lifecycle/): support/maintenance status of Dotkernel's open-source packages
14+
- [Contact](https://new.dotkernel.com/contact/)
15+
16+
## Categories
17+
18+
- [Dotkernel](https://new.dotkernel.com/category/dotkernel/): the core framework — releases, caching, sessions, auth, WURFL/device detection (64 posts)
19+
- [PHP Development](https://new.dotkernel.com/category/php-development/): general PHP tooling, environments, IDEs, security (20 posts)
20+
- [How to's](https://new.dotkernel.com/category/how-to/): practical guides — migrations, CORS, PSR-7, routing (14 posts)
21+
- [Best Practice](https://new.dotkernel.com/category/best-practice/): coding standards and database access patterns (13 posts)
22+
- [Dotkernel API](https://new.dotkernel.com/category/dotkernel-api/): REST API package — auth, content negotiation, OpenAPI (10 posts)
23+
- [Dotkernel 3](https://new.dotkernel.com/category/dotkernel3/): the v3 rewrite on Zend Expressive/Mezzio (9 posts)
24+
- [Headless Platform](https://new.dotkernel.com/category/headless-platform/): the current Dotkernel headless architecture (9 posts)
25+
- [Zend Framework](https://new.dotkernel.com/category/zend-framework/): Zend Framework 1 history and end-of-life notes (8 posts)
26+
- [Javascript](https://new.dotkernel.com/category/javascript/): frontend/JS topics (3 posts)
27+
- [Middleware](https://new.dotkernel.com/category/middleware/): PSR-15 middleware and routing internals (3 posts)
28+
- [Architecture](https://new.dotkernel.com/category/architecture/): request lifecycle and application bootstrapping (3 posts)
29+
- [PHP Troubleshooting](https://new.dotkernel.com/category/php-troubleshooting/): fixes for common PHP setup issues (2 posts)
30+
- [Android](https://new.dotkernel.com/category/android/): Android install-referrer and broadcast receivers (2 posts)
31+
- [PHPStorm](https://new.dotkernel.com/category/phpstorm/): IDE setup (1 post)
32+
- [Licensing](https://new.dotkernel.com/category/licensing/): open-source license comparisons (1 post)
33+
34+
## Optional
35+
36+
- [Dotkernel Headless Platform: The What's, How's and Why's](https://new.dotkernel.com/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys/): best starting point for understanding the current platform
37+
- [Understanding Middleware](https://new.dotkernel.com/architecture/understanding-middleware/)
38+
- [Request Lifecycle for a Mezzio Based Application](https://new.dotkernel.com/architecture/request-lifecycle-for-a-mezzio-based-application/)
39+
- [ConfigProvider: Bootstrap Modern PHP Applications](https://new.dotkernel.com/architecture/configprovider-bootstrap-modern-php-applications/)
40+
- [What is PSR-7 and How to Use It](https://new.dotkernel.com/how-to/what-is-psr-7-and-how-to-use-it/)
41+
- [Dependency Injection Made Easy in Laminas/Mezzio Applications](https://new.dotkernel.com/dotkernel/dependency-injection-made-easy-in-laminas-mezzio-applications/)

src/App/src/ConfigProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public function getDependencies(): array
122122
* paths: array{
123123
* app: array{literal-string&non-falsy-string},
124124
* error: array{literal-string&non-falsy-string},
125+
* jsonld: array{literal-string&non-falsy-string},
125126
* layout: array{literal-string&non-falsy-string},
126127
* partial: array{literal-string&non-falsy-string},
127128
* }
@@ -133,6 +134,7 @@ public function getTemplates(): array
133134
'paths' => [
134135
'app' => [__DIR__ . '/../templates/app'],
135136
'error' => [__DIR__ . '/../templates/error'],
137+
'jsonld' => [__DIR__ . '/../templates/jsonld'],
136138
'layout' => [__DIR__ . '/../templates/layout'],
137139
'partial' => [__DIR__ . '/../templates/partial'],
138140
],

src/App/src/RoutesDelegator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Light\App;
66

77
use Laminas\Diactoros\Response\RedirectResponse;
8+
use Light\App\Handler\GetIndexMarkdownHandler;
89
use Light\App\Handler\GetIndexViewHandler;
910
use Mezzio\Application;
1011
use Psr\Container\ContainerInterface;
@@ -23,6 +24,7 @@ public function __invoke(ContainerInterface $container, string $serviceName, cal
2324
$uri = $request->getUri();
2425
return new RedirectResponse((string) $uri . '/', 301);
2526
});
27+
2628
$app->get('/{first}/{second}', function ($request) {
2729
$uri = $request->getUri();
2830
return new RedirectResponse((string) $uri . '/', 301);

src/App/templates/app/index.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends '@layout/default.html.twig' %}
2-
2+
{% block json_ld %} {% include '@jsonld/index.jsonld.twig'%} {% endblock %}
33
{% block title %}A PSR-15 compliant application{% endblock %}
44

55
{% block content %}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<script type="application/ld+json">
2+
{
3+
"@context": "https://schema.org",
4+
"@graph": [
5+
{
6+
"@type": "WebSite",
7+
"@id": "{{ absolute_url('/') }}#website",
8+
"url": "{{ absolute_url('/') }}",
9+
"name": "Dotkernel",
10+
"description": "Dotkernel is a collection of open-source application skeletons built on Mezzio and Laminas - pre-configured and ready for anything from a presentation site to an enterprise-grade API.",
11+
"publisher": { "@id": "{{ absolute_url('/') }}#organization" }
12+
},
13+
{
14+
"@type": "Organization",
15+
"@id": "{{ absolute_url('/') }}#organization",
16+
"name": "Dotkernel",
17+
"url": "{{ absolute_url('/') }}",
18+
"logo": "{{ absolute_url(asset('images/app/dotkernel-logo.png')) }}",
19+
"sameAs": [
20+
"https://github.com/dotkernel",
21+
"https://www.dotkernel.com"
22+
],
23+
"parentOrganization": {
24+
"@type": "Organization",
25+
"name": "Apidemia",
26+
"url": "https://www.apidemia.com"
27+
}
28+
},
29+
{
30+
"@type": "SoftwareApplication",
31+
"name": "Dotkernel API",
32+
"applicationCategory": "DeveloperApplication",
33+
"operatingSystem": "Cross-platform",
34+
"description": "A framework-less, opinionated toolkit for intermediate-to-advanced developers who want to ship REST APIs quickly and efficiently. An alternative to legacy Laminas API Tools (Apigility).",
35+
"url": "https://github.com/dotkernel/api",
36+
"license": "https://opensource.org/licenses/BSD-3-Clause",
37+
"offers": {
38+
"@type": "Offer",
39+
"price": "0",
40+
"priceCurrency": "USD"
41+
}
42+
},
43+
{
44+
"@type": "SoftwareApplication",
45+
"name": "Dotkernel Admin",
46+
"applicationCategory": "DeveloperApplication",
47+
"operatingSystem": "Cross-platform",
48+
"description": "A ready-to-go admin skeleton for managing your platform's records with a simple, table-based approach - plus the tools to build reports and dashboards.",
49+
"url": "https://github.com/dotkernel/admin",
50+
"license": "https://opensource.org/licenses/BSD-3-Clause",
51+
"offers": {
52+
"@type": "Offer",
53+
"price": "0",
54+
"priceCurrency": "USD"
55+
}
56+
},
57+
{
58+
"@type": "SoftwareApplication",
59+
"name": "Dotkernel Queue",
60+
"applicationCategory": "DeveloperApplication",
61+
"operatingSystem": "Cross-platform",
62+
"description": "Asynchronous task queuing built on Symfony Messenger, wired into the Laminas Service Manager container via netglue/laminas-messenger.",
63+
"url": "https://github.com/dotkernel/queue",
64+
"license": "https://opensource.org/licenses/BSD-3-Clause",
65+
"offers": {
66+
"@type": "Offer",
67+
"price": "0",
68+
"priceCurrency": "USD"
69+
}
70+
},
71+
{
72+
"@type": "SoftwareApplication",
73+
"name": "Dotkernel Light",
74+
"applicationCategory": "DeveloperApplication",
75+
"operatingSystem": "Cross-platform",
76+
"description": "A minimal, PSR-15 compliant skeleton built for learning purposes - a simple, didactic example of how to put together a basic website.",
77+
"url": "https://github.com/dotkernel/light",
78+
"license": "https://opensource.org/licenses/BSD-3-Clause",
79+
"offers": {
80+
"@type": "Offer",
81+
"price": "0",
82+
"priceCurrency": "USD"
83+
}
84+
},
85+
{
86+
"@type": "SoftwareApplication",
87+
"name": "Dotkernel Frontend",
88+
"applicationCategory": "DeveloperApplication",
89+
"operatingSystem": "Cross-platform",
90+
"description": "A web starter skeleton for building frontend applications on Mezzio and Laminas - a standalone alternative, separate from the Headless Platform.",
91+
"url": "https://github.com/dotkernel/frontend",
92+
"license": "https://opensource.org/licenses/BSD-3-Clause",
93+
"offers": {
94+
"@type": "Offer",
95+
"price": "0",
96+
"priceCurrency": "USD"
97+
}
98+
}
99+
]
100+
}
101+
</script>

src/App/templates/layout/default.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600" rel="stylesheet">
1919
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600" rel="stylesheet">
2020
<link href="{{ asset('css/app.css') }}" rel="stylesheet" />
21-
{% block stylesheets %}
22-
{% endblock %}
21+
{% block json_ld %}{% endblock %}
22+
{% block stylesheets %}{% endblock %}
2323
</head>
2424
<body class="app d-flex flex-column min-vh-100 {% block body_class %}{% endblock %}">
2525
<header class="sticky-top">

src/Blog/src/ConfigProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,16 @@ private function getDoctrineConfig(): array
9999
* @return array{
100100
* paths: array{
101101
* page: array{literal-string&non-falsy-string},
102+
* jsonld: array{literal-string&non-falsy-string},
102103
* }
103104
* }
104105
*/
105106
private function getTemplates(): array
106107
{
107108
return [
108109
'paths' => [
109-
'page' => [__DIR__ . '/../templates/page'],
110+
'page' => [__DIR__ . '/../templates/page'],
111+
'jsonld' => [__DIR__ . '/../templates/page/jsonld'],
110112
],
111113
];
112114
}

src/Blog/templates/page/author-resource.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{% extends '@layout/default.html.twig' %}
2+
{% block json_ld %} {% include '@jsonld/author-resource.jsonld.twig'%} {% endblock %}
23

34
{% block title %}{{ author.name }}{% endblock %}
45

src/Blog/templates/page/blog-resource/android/listen-for-android-install-referrer.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{% extends '@layout/default.html.twig' %}
2+
{% block json_ld %} {% include '@jsonld/android/listen-for-android-install-referrer.jsonld.twig'%} {% endblock %}
23

34
{% block title %}Listen for Android install referrer{% endblock %}
45

0 commit comments

Comments
 (0)