@press2ai/engine 0.4.3 → 0.5.1
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 +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@press2ai/engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
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
|
@@ -74,6 +74,10 @@ const trenerContentSchema = z.object({
|
|
|
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>;
|
|
@@ -105,6 +109,7 @@ export const trenerTemplate: PresenceTemplate<TrenerContent, TrenerTheme> = {
|
|
|
105
109
|
},
|
|
106
110
|
profiles: [],
|
|
107
111
|
cities: [],
|
|
112
|
+
sections: { afterHero: '', afterGrid: '' },
|
|
108
113
|
},
|
|
109
114
|
|
|
110
115
|
editor: {
|
|
@@ -227,7 +232,7 @@ function renderIndex(req: RenderRequest<TrenerContent>, ctx: RenderContext<Trene
|
|
|
227
232
|
extraParams: q ? `&q=${encodeURIComponent(q)}` : '',
|
|
228
233
|
});
|
|
229
234
|
|
|
230
|
-
const body = `${hero}${stats}${cityNav}${grid}${pag}`;
|
|
235
|
+
const body = `${hero}${stats}${content.sections.afterHero}${cityNav}${grid}${pag}${content.sections.afterGrid}`;
|
|
231
236
|
|
|
232
237
|
const jsonLd = {
|
|
233
238
|
'@context': 'https://schema.org',
|