File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ $ llmsTxtLink = '</llms.txt>; rel="llms-txt", </llms-full.txt>; rel="llms-full-txt" ' ;
6+ $ serviceDocLink = static fn (string $ url ): string => sprintf ('<%s>; rel="service-doc", ' , $ url ) . $ llmsTxtLink ;
7+
8+ return [
9+ 'dot_response_headers ' => [
10+ '* ' => [
11+ 'X-Powered-By ' => [
12+ 'value ' => 'Dotkernel ' ,
13+ 'overwrite ' => true ,
14+ ],
15+ 'X-Llms-Txt ' => [
16+ 'value ' => '/llms.txt ' ,
17+ 'overwrite ' => true ,
18+ ],
19+ 'Link ' => [
20+ 'value ' => $ llmsTxtLink ,
21+ 'overwrite ' => true ,
22+ ],
23+ ],
24+ 'app::index ' => [
25+ 'Link ' => [
26+ 'value ' => $ serviceDocLink ('https://docs.dotkernel.org/ ' ),
27+ 'overwrite ' => true ,
28+ ],
29+ ],
30+ 'page::api ' => [
31+ 'Link ' => [
32+ 'value ' => $ serviceDocLink ('https://docs.dotkernel.org/api-documentation/ ' ),
33+ 'overwrite ' => true ,
34+ ],
35+ ],
36+ 'page::admin ' => [
37+ 'Link ' => [
38+ 'value ' => $ serviceDocLink ('https://docs.dotkernel.org/admin-documentation/ ' ),
39+ 'overwrite ' => true ,
40+ ],
41+ ],
42+ 'page::queue ' => [
43+ 'Link ' => [
44+ 'value ' => $ serviceDocLink ('https://docs.dotkernel.org/queue-documentation/ ' ),
45+ 'overwrite ' => true ,
46+ ],
47+ ],
48+ 'page::light ' => [
49+ 'Link ' => [
50+ 'value ' => $ serviceDocLink ('https://docs.dotkernel.org/light-documentation/ ' ),
51+ 'overwrite ' => true ,
52+ ],
53+ ],
54+ 'page::frontend ' => [
55+ 'Link ' => [
56+ 'value ' => $ serviceDocLink ('https://docs.dotkernel.org/frontend/ ' ),
57+ 'overwrite ' => true ,
58+ ],
59+ ],
60+ 'page::wsl2 ' => [
61+ 'Link ' => [
62+ 'value ' => $ serviceDocLink ('https://docs.dotkernel.org/development/v2/terminal/ ' ),
63+ 'overwrite ' => true ,
64+ ],
65+ ],
66+ 'page::architecture ' => [
67+ 'Link ' => [
68+ 'value ' => $ serviceDocLink ('https://docs.dotkernel.org/api-documentation/ ' ),
69+ 'overwrite ' => true ,
70+ ],
71+ ],
72+ ],
73+ ];
Original file line number Diff line number Diff line change @@ -47,35 +47,19 @@ $app = [
4747];
4848
4949return [
50- 'application' => $app,
51- 'databases' => $databases,
52- 'dot_response_headers' => [
53- '*' => [
54- 'X-Powered-By' => [
55- 'value' => $app['meta']['siteName'],
56- 'overwrite' => true,
57- ],
58- 'X-Llms-Txt' => [
59- 'value' => '/llms.txt',
60- 'overwrite' => true,
61- ],
62- 'Link' => [
63- 'value' => '</llms.txt>; rel="llms-txt", </llms-full.txt>; rel="llms-full-txt"',
64- 'overwrite' => true,
65- ],
66- ],
67- ],
68- 'doctrine' => [
50+ 'application' => $app,
51+ 'databases' => $databases,
52+ 'doctrine' => [
6953 'connection' => [
7054 'orm_default' => [
7155 'params' => $databases['default'],
7256 ],
7357 ],
7458 ],
75- 'feed' => [
59+ 'feed' => [
7660 'path' => realpath(__DIR__ . '/../../public/feed.xml'),
7761 ],
78- 'llms' => [
62+ 'llms' => [
7963 'sourceDir' => realpath(__DIR__ . '/../../public/md-articles'),
8064 'outputFile' => realpath(__DIR__ . '/../../public/llms-full.txt'),
8165 // Markdown versions of the static pages, appended after the articles. Optional.
Original file line number Diff line number Diff line change 4141 // Register the routing middleware in the middleware pipeline.
4242 // This middleware registers the Mezzio\Router\RouteResult request attribute.
4343 $ app ->pipe (RouteMiddleware::class);
44- $ app ->pipe (ResponseHeaderMiddleware::class);
4544
4645 // The following handle routing failures for common conditions:
4746 // - HEAD request but no routes answer that method
5251 $ app ->pipe (ImplicitHeadMiddleware::class);
5352 $ app ->pipe (ImplicitOptionsMiddleware::class);
5453 $ app ->pipe (MethodNotAllowedMiddleware::class);
54+ $ app ->pipe (ResponseHeaderMiddleware::class);
5555
5656 // Seed the UrlHelper with the routing results:
5757 $ app ->pipe (UrlHelperMiddleware::class);
You can’t perform that action at this time.
0 commit comments