@press2ai/engine 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ceidg-vertical.ts +9 -0
- package/src/template-trener.ts +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@press2ai/engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Multi-tenant runtime + template contracts dla otwarty-* verticali. SSR na Cloudflare Workers, isomorphic renderer (SSG/browser w roadmapie).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/ceidg-vertical.ts
CHANGED
|
@@ -94,6 +94,11 @@ export interface VerticalConfig {
|
|
|
94
94
|
};
|
|
95
95
|
/** llms.txt — header + intro paragraph. Lista profili dopisywana automatycznie. */
|
|
96
96
|
llms: { title: string; intro: string };
|
|
97
|
+
/** Static HTML sections injected into the index page between engine-rendered blocks. */
|
|
98
|
+
sections?: {
|
|
99
|
+
afterHero?: string;
|
|
100
|
+
afterGrid?: string;
|
|
101
|
+
};
|
|
97
102
|
/** Theme bundle. Wertykal buduje adapter (Profile ↔ TrenerProfile) i podaje gotowy. */
|
|
98
103
|
theme: TrenerTheme;
|
|
99
104
|
}
|
|
@@ -168,6 +173,10 @@ export function createVerticalApp(config: VerticalConfig): Hono<{ Bindings: Ceid
|
|
|
168
173
|
},
|
|
169
174
|
profiles: (leadsRes.results ?? []).map(leadToProfile),
|
|
170
175
|
cities: citiesRes.results ?? [],
|
|
176
|
+
sections: {
|
|
177
|
+
afterHero: config.sections?.afterHero ?? '',
|
|
178
|
+
afterGrid: config.sections?.afterGrid ?? '',
|
|
179
|
+
},
|
|
171
180
|
};
|
|
172
181
|
}
|
|
173
182
|
|
package/src/template-trener.ts
CHANGED
|
@@ -68,12 +68,16 @@ const trenerContentSchema = z.object({
|
|
|
68
68
|
heroSubtitle: z.string().optional(),
|
|
69
69
|
searchPlaceholder: z.string().default('Szukaj...'),
|
|
70
70
|
/** Plural label for the count in statBar (e.g. 'trenerów', 'terapeutów'). */
|
|
71
|
-
itemsLabel: z.string()
|
|
71
|
+
itemsLabel: z.string(),
|
|
72
72
|
/** Singular fallback shown on 404 (e.g. 'trenera', 'terapeuty'). */
|
|
73
|
-
itemSingular: z.string()
|
|
73
|
+
itemSingular: z.string(),
|
|
74
74
|
}),
|
|
75
75
|
profiles: z.array(profileSchema),
|
|
76
76
|
cities: z.array(z.object({ name: z.string(), count: z.number() })).default([]),
|
|
77
|
+
sections: z.object({
|
|
78
|
+
afterHero: z.string().default(''),
|
|
79
|
+
afterGrid: z.string().default(''),
|
|
80
|
+
}).default({}),
|
|
77
81
|
});
|
|
78
82
|
|
|
79
83
|
export type TrenerContent = z.infer<typeof trenerContentSchema>;
|
|
@@ -227,7 +231,7 @@ function renderIndex(req: RenderRequest<TrenerContent>, ctx: RenderContext<Trene
|
|
|
227
231
|
extraParams: q ? `&q=${encodeURIComponent(q)}` : '',
|
|
228
232
|
});
|
|
229
233
|
|
|
230
|
-
const body = `${hero}${stats}${cityNav}${grid}${pag}`;
|
|
234
|
+
const body = `${hero}${stats}${content.sections.afterHero}${cityNav}${grid}${pag}${content.sections.afterGrid}`;
|
|
231
235
|
|
|
232
236
|
const jsonLd = {
|
|
233
237
|
'@context': 'https://schema.org',
|