@press2ai/engine 0.4.3 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@press2ai/engine",
3
- "version": "0.4.3",
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",
@@ -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
 
@@ -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>;
@@ -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',