Skip to content

feat: Sanity CMS integration with filesystem fallback, deck rename#21

Merged
developeranku merged 5 commits into
mainfrom
feat/sanity-cms
May 7, 2026
Merged

feat: Sanity CMS integration with filesystem fallback, deck rename#21
developeranku merged 5 commits into
mainfrom
feat/sanity-cms

Conversation

@developeranku
Copy link
Copy Markdown
Member

Summary

  • Add optional Sanity CMS as an authoring source. The app boots without Sanity env vars and serves filesystem decks only; with Sanity configured, decks from both sources are merged (Sanity wins on slug collision).
  • Embed Sanity Studio at `/studio` with a `deck` schema (metadata + slides[] containing full HTML per slide).
  • Rename `case-studies/` folder to `slides/` (gitignored, per-developer working dir).
  • Rename all `caseStudy` / `CaseStudy` identifiers to `deck` / `Deck` across types, functions, schema, GROQ queries, cache tags, webhook handlers, and docs for OSS-friendly naming.
  • Inject `` when serving slide HTML so relative `./assets/...` paths resolve correctly inside the iframe.
  • Rewrite README end-to-end for an open-source audience (quick-start, authoring contract, meta.json reference, routes, env vars, keyboard shortcuts, deploy notes, contributing guardrails).
  • Add `/api/revalidate` webhook receiver that validates Sanity HMAC signatures and refreshes affected cache tags.

Test plan

  • `pnpm dev` boots without any env vars set, filesystem decks load from `slides//`.
  • Drop a folder into `slides/hello/` with a `meta.json` and HTML files, reload, verify it appears on the index.
  • Verify slide images load (the `` tag fix).
  • Verify viewer keyboard shortcuts (1-9, F, Esc, arrows).
  • Verify PDF download with the appended contact card page.
  • Verify per-deck OG image renders without Satori errors.
  • With Sanity env vars set, verify `/studio` loads, a published deck appears in the index alongside filesystem decks, and `/api/revalidate` is reachable.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stackdeck Ready Ready Preview, Comment May 7, 2026 11:55am

@developeranku developeranku merged commit 01f56c6 into main May 7, 2026
3 checks passed
@developeranku developeranku deleted the feat/sanity-cms branch May 7, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant