- Install @sanity/client + @portabletext/to-html - studio/ — Sanity v3 project with post schema (title, slug, date, category, summary, cover image with hotspot, Portable Text body). Run with `cd studio && npm install && sanity dev` after setting SANITY_STUDIO_PROJECT_ID. - src/lib/sanity.ts — typed client, GROQ queries, Portable Text → HTML conversion - src/lib/news.ts — adds getArticles() / getArticle() async functions that prefer Sanity when SANITY_PROJECT_ID is set; fall back to local markdown otherwise - events/index.astro, events/[slug].astro, events/page/[page].astro — switch to async getArticles()/getArticle(); [slug].astro drops getStaticPaths() in favour of SSR request-time fetch with redirect-on-not-found - .env.example — documents SANITY_PROJECT_ID / SANITY_DATASET / SANITY_API_TOKEN Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
273 B
JSON
15 lines
273 B
JSON
{
|
|
"name": "rda-studio",
|
|
"private": true,
|
|
"version": "1.0.0",
|
|
"scripts": {
|
|
"dev": "sanity dev",
|
|
"build": "sanity build",
|
|
"deploy": "sanity deploy"
|
|
},
|
|
"dependencies": {
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"sanity": "^3.66.0"
|
|
}
|
|
}
|