Proxel.studio
Web Performance

How to Start first Blog

Vahid
Vahid
Mar 19, 20265 min read
How to Start first Blog

IMPORTANT NOTES

Do NOT delete the static data from constants.ts yet. Keep it as fallback.

Add a fallback in each fetch: if Sanity returns empty, use static data.

Example:
const sanityPosts = await client.fetch(postsQuery)
const posts = sanityPosts.length > 0 ? sanityPosts : staticPosts

This ensures the site works even before you add content in Sanity.

The @sanity/code-input package is needed for code blocks in blog posts:
npm install @sanity/code-input
Then add it to sanity.config.ts plugins: [structureTool(), visionTool(), codeInput()]


Vahid

Vahid

Web performance expert and technical lead at Proxel Studio. Passionate about building fast, accessible, and scalable digital experiences.