v3: correctly using SITE_NAME across the app, added notifications on comments
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 44s

This commit is contained in:
khannurien
2026-04-08 20:12:30 +00:00
parent 856511777c
commit ed7695663e
16 changed files with 185 additions and 59 deletions

View File

@@ -4,6 +4,8 @@ import { lingui } from "@lingui/vite-plugin";
import fs from "node:fs";
import path from "node:path";
const SITE_NAME = process.env.GERBEUR_SITE_NAME || "gerbeur";
function manifestPlugin(): Plugin {
const cssPath = path.resolve("src/index.css");
const outPath = path.resolve("public/manifest.webmanifest");
@@ -21,8 +23,8 @@ function manifestPlugin(): Plugin {
const bgColor = cssVar(rootBlock, "--color-bg") ?? "#111827";
const manifest = {
name: "gerbeur",
short_name: "gerbeur",
name: SITE_NAME,
short_name: SITE_NAME,
start_url: "/",
display: "standalone",
background_color: bgColor,
@@ -73,6 +75,18 @@ export default defineConfig({
},
plugins: [
manifestPlugin(),
{
// In dev the API server isn't serving index.html, so replace the placeholder here.
// In production the Oak server does the replacement at runtime (see api/lib/static.ts).
name: "inject-site-name",
transformIndexHtml: {
order: "pre",
handler: (html, ctx) =>
ctx.server
? html.replaceAll("__SITE_NAME__", SITE_NAME)
: html,
},
},
lingui(),
react({
plugins: [["@lingui/swc-plugin", {}]],