Initial commit: BlackDice site rebuild with integrated CMS
Rebuilds content management around a single admin route (/admin — "BlackDice Studio"), replacing blackdice-studio.html. Publishing writes one JSON content document instead of regenerating HTML files, so it can no longer overwrite hand-made site changes the way the old tool did. - /admin: click-to-edit copy/images, article CRUD with a Word-safe rich text editor, demo clip management, per-page SEO, enquiry log, publish history with rollback - Real per-page URLs for all pages and articles, each with its own meta/canonical/OG/JSON-LD - Newsroom + article pages driven by the CMS post library, seeded from the old studio's export (17 articles) plus a drafted GSMA Open Gateway press release awaiting approval - Demo sections on Mobile SDK and Halo CPE, interactive by default and upgradable to an uploaded clip per slot - Dependency-free Node API server (auth, publish, uploads, snapshots, leads, live sitemap) - Deployment configs for Node/nginx/IIS, Vercel and Netlify See docs/ARCHITECTURE.md, docs/PROJECT-STRUCTURE.md, docs/CMS-GUIDE.md and docs/DEPLOYMENT.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
declare const process: { env: Record<string, string | undefined> }
|
||||
|
||||
const API_TARGET = process.env.API_URL || 'http://localhost:8787'
|
||||
|
||||
// Vite config — React + TS. Honors the PORT env (used by the preview harness);
|
||||
// falls back to 5173 and auto-increments if busy.
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
// Keep logical paths under the project root even when served via a symlink/junction
|
||||
// (needed so the TS/JSX transform applies in the preview harness).
|
||||
resolve: { preserveSymlinks: true },
|
||||
server: {
|
||||
port: process.env.PORT ? Number(process.env.PORT) : 5173,
|
||||
// The CMS API and its uploaded media are served by server/index.mjs in dev too,
|
||||
// so publishing from /admin behaves exactly as it does in production.
|
||||
proxy: {
|
||||
'/api': { target: API_TARGET, changeOrigin: true },
|
||||
'/content/uploads': { target: API_TARGET, changeOrigin: true },
|
||||
'/content/site-content.json': { target: API_TARGET, changeOrigin: true },
|
||||
'/sitemap.xml': { target: API_TARGET, changeOrigin: true },
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user