Harden CMS security, fix SEO/a11y gaps, and fill in missing article images
CI / build (push) Has been cancelled
CI / build (push) Has been cancelled
Server: refuse to start in production with the default admin password, drop SVG from the upload allow-list (stored-XSS risk), add baseline security headers, make the login rate limiter proxy-aware via TRUST_PROXY, and auto-load .env.local/.env in dev. Admin: sanitise post bodies on content import/snapshot restore (previously bypassed sanitiseBody), confirm before discarding a draft, drop back to the login screen on a mid-session 401 instead of a stuck error, add hero-image alt text and a title/excerpt search to the articles panel. Site: replace the soft-404-to-homepage fallback with a real noindex 404 page, add a focus trap/Escape handling/aria-modal to the enquiry modal, aria-expanded on the mobile nav toggle, ItemList/breadcrumb structured data for the newsroom and articles, and wire sitemap generation into the build so it can't go stale. Extract the duplicated NewsGrid/ArticlePage card markup into a shared PostCard component. Content: 13 of 18 seed articles shipped with no hero image (one pointed at a dead WordPress URL); the live blackdice.ai site turned out to still be the old blackdice-studio.html export, so recovering the originals wasn't feasible. Filled the gap with freely-licensed Unsplash placeholders, credited in the author field, until real photography is ready. Also adds a Gitea Actions CI workflow (typecheck + build). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+7
-5
@@ -109,12 +109,14 @@ redeploy — the build copies neither automatically, so they must be placed alon
|
||||
## Release checklist
|
||||
|
||||
1. `npm ci && npm run build` — the build fails on type errors, so it gates itself.
|
||||
2. `node scripts/generate-sitemap.mjs https://www.blackdice.ai` if the static
|
||||
sitemap needs refreshing (the server's live one needs nothing).
|
||||
3. Deploy `dist/`, `server/`, `package.json`, and keep `content/` in place.
|
||||
4. Check: `/`, `/mobile-sdk`, `/news`, one `/blog/<slug>` deep link, `/sitemap.xml`,
|
||||
`build` also regenerates `public/sitemap.xml`/`robots.txt` from whatever is in
|
||||
`content/site-content.json` (falling back to factory content) before `vite
|
||||
build` copies `public/` into `dist/`, so the static sitemap can't go stale
|
||||
relative to the last build. Set `SITE_URL` if it isn't `https://www.blackdice.ai`.
|
||||
2. Deploy `dist/`, `server/`, `package.json`, and keep `content/` in place.
|
||||
3. Check: `/`, `/mobile-sdk`, `/news`, one `/blog/<slug>` deep link, `/sitemap.xml`,
|
||||
`/admin` login.
|
||||
5. In Search Console, submit `https://www.blackdice.ai/sitemap.xml` and request
|
||||
4. In Search Console, submit `https://www.blackdice.ai/sitemap.xml` and request
|
||||
indexing for the product pages — they now have their own URLs to index.
|
||||
|
||||
## After the first deploy
|
||||
|
||||
Reference in New Issue
Block a user