Website 1.2.0: starter pages on a new install, and a site icon

A new install had no pages, so the home page and its live preview showed
only the header and footer (found on cross-demo2). The backend now adds the
fixed pages with starter text at startup. Settings -> Site icon sets the
favicon, with a default from the church's colour and initial. The Latest
message's Card layout has its name; the media picker's placeholder has
enough contrast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 08:18:47 +02:00
co-authored by Claude Opus 5.5
parent 6905a19c8c
commit 79e1450df6
18 changed files with 285 additions and 24 deletions
+5
View File
@@ -11,6 +11,7 @@ import { createApp } from './app.js';
import { createCtx } from './context.js';
import { connectFromEnv, heartbeat, startHeartbeats } from './hub/client.js';
import { loadConfig } from './lib/config.js';
import { ensureStarterPages } from './site/starter.js';
import { startYoutubeSync } from './site/youtube.js';
import { startFeedSync } from './feed/feed.js';
@@ -20,6 +21,10 @@ async function main() {
if (!url) throw new Error('DATABASE_URL isn\'t set.');
const db = new PrismaClient({ adapter: new PrismaPg({ connectionString: url, connectionTimeoutMillis: 5000 }) });
const ctx = createCtx(config, db);
// A new install's fixed pages (home, Plan your visit, …), before anything is served.
await ensureStarterPages(ctx)
.then((kinds) => { if (kinds.length) console.log(`[website] Added the starter pages: ${kinds.join(', ')}.`); })
.catch((e) => console.error('[website] Couldn\'t add the starter pages:', (e as Error).message));
const app = createApp(ctx);
const server = app.listen(config.port, () => console.log(`[website] Listening on ${config.port} (${config.publicUrl}).`));
const stopHeartbeats = startHeartbeats(ctx);