{"id":24874682,"url":"https://github.com/dirheimerb/sanity-blog","last_synced_at":"2025-06-21T17:02:20.793Z","repository":{"id":105234928,"uuid":"576695805","full_name":"dirheimerb/sanity-blog","owner":"dirheimerb","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-09T19:40:34.000Z","size":1299,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T17:01:50.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dirheimerb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-10T17:24:04.000Z","updated_at":"2022-12-10T17:24:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"212db748-42c2-4d61-a690-11c3f42aa4b1","html_url":"https://github.com/dirheimerb/sanity-blog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"sanity-io/nextjs-blog-cms-sanity-v3","purl":"pkg:github/dirheimerb/sanity-blog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirheimerb%2Fsanity-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirheimerb%2Fsanity-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirheimerb%2Fsanity-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirheimerb%2Fsanity-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirheimerb","download_url":"https://codeload.github.com/dirheimerb/sanity-blog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirheimerb%2Fsanity-blog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261162063,"owners_count":23118219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-01T07:28:10.274Z","updated_at":"2025-06-21T17:02:15.706Z","avatar_url":"https://github.com/dirheimerb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Next.js Blog with a Native Authoring Experience\u003c!-- omit in toc --\u003e\n\nThis starter is a statically generated blog that uses [Next.js][nextjs] for the frontend and [Sanity][sanity-homepage] to handle its content. It comes with a native Sanity Studio that offers features like real-time collaboration, instant side-by-side content previews, and intuitive editing.\n\nThe Studio connects to Sanity Content Lake, which gives you hosted content APIs with a flexible query language, on-demand image transformations, powerful patching, and more. You can use this starter to kick-start a blog or learn these technologies.\n\n[![Deploy with Vercel](https://vercel.com/button)][vercel-deploy]\n\n## Features\n\n- A performant, static blog with editable posts, authors, and site settings\n- A native and customizable authoring environment, accessible on `yourblog.com/studio`\n- Real-time and collaborative content editing with fine-grained revision history\n- Side-by-side instant content preview that works across your whole site\n- Support for block content and the most advanced custom fields capability in the industry\n- Webhook-triggered Incremental Static Revalidation; no need to wait for a rebuild to publish new content\n- Free and boosted Sanity project with unlimited admin users, free content updates, and pay-as-you-go for API overages\n- A project with starter-friendly and not too heavy-handed TypeScript and Tailwind.css\n\n## Table of Contents\n\n- [Features](#features)\n- [Table of Contents](#table-of-contents)\n- [Project Overview](#project-overview)\n  - [Important files and folders](#important-files-and-folders)\n- [Configuration](#configuration)\n  - [Step 1. Set up the environment](#step-1-set-up-the-environment)\n  - [Step 2. Set up the project locally](#step-2-set-up-the-project-locally)\n  - [Step 3. Run Next.js locally in development mode](#step-3-run-nextjs-locally-in-development-mode)\n  - [Step 4. Deploy to production](#step-4-deploy-to-production)\n- [Questions and Answers](#questions-and-answers)\n  - [It doesn't work! Where can I get help?](#it-doesnt-work-where-can-i-get-help)\n  - [How can I remove the \"Next steps\" block from my blog?](#how-can-i-remove-the-next-steps-block-from-my-blog)\n  - [How can I set up Incremental Static Revalidation?](#how-can-i-set-up-incremental-static-revalidation)\n- [Next steps](#next-steps)\n\n## Project Overview\n\n| [Blog](https://nextjs-blog.sanity.build)                                                                       | [Studio](https://nextjs-blog.sanity.build/studio)                                                                       |\n| -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| ![Blog](https://user-images.githubusercontent.com/44635000/197511913-94ea36dd-099d-4dbf-b71f-3335879621c9.png) | ![Sanity Studio](https://user-images.githubusercontent.com/44635000/197511725-b2a2e2e5-287b-41a9-84c6-ec90d37ca480.png) |\n\n### Important files and folders\n\n| File(s)                                     | Description                                              |\n| ------------------------------------------- | -------------------------------------------------------- |\n| `sanity.config.ts`                          |  Config file for Sanity Studio                           |\n| `sanity.cli.ts`                             |  Config file for Sanity CLI                              |\n| `/pages/studio/[[...index]].tsx`            |  Where Sanity Studio is mounted                          |\n| `/pages/api/revalidate.ts`                  |  Serverless route for triggering ISR                     |\n| `/pages/api/preview.ts`                     |  Serverless route for triggering Preview mode            |\n| `/schemas`                                  |  Where Sanity Studio gets its content types from         |\n| `/plugins`                                  |  Where the advanced Sanity Studio customization is setup |\n| `/lib/sanity.api.ts`,`/lib/sanity.image.ts` | Configuration for the Sanity Content Lake client         |\n| `/lib/sanity.preview.ts`                    | Configuration for the live Preview Mode                  |\n\n## Configuration\n\n### Step 1. Set up the environment\n\nUse the Deploy Button below. It will let you deploy the starter using [Vercel](https://vercel.com?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=next-sanity-example) as well as connect it to your Sanity Content Lake using [the Sanity Vercel Integration][integration].\n\n[![Deploy with Vercel](https://vercel.com/button)][vercel-deploy]\n\n### Step 2. Set up the project locally\n\n[Clone the repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) that was created for you on your GitHub account. Once cloned, run the following command from the project's root directory:\n\n```bash\nnpx vercel link\n```\n\nDownload the environment variables needed to connect Next.js and the Studio to your Sanity project:\n\n```bash\nnpx vercel env pull\n```\n\n### Step 3. Run Next.js locally in development mode\n\n```bash\nnpm install \u0026\u0026 npm run dev\n```\n\nWhen you run this development server, the changes you make in your frontend and studio configuration will be applied live using hot reloading.\n\nYour blog should be up and running on [http://localhost:3000][localhost-3000]! You can create and edit content on [http://localhost:3000/studio][localhost-3000-studio].\n\n### Step 4. Deploy to production\n\nTo deploy your changes to production you use `git`:\n\n```bash\ngit add .\ngit commit\ngit push\n```\n\nAlternatively, you can deploy without a `git` hosting provider using the Vercel CLI:\n\n```bash\nnpx vercel --prod\n```\n\n## Questions and Answers\n\n### It doesn't work! Where can I get help?\n\nIn case of any issues or questions, you can post:\n\n- [GitHub Discussions for Next.js][vercel-github]\n- [Sanity's GitHub Discussions][sanity-github]\n- [Sanity's Community Slack][sanity-community]\n\n### How can I remove the \"Next steps\" block from my blog?\n\nYou can remove it by deleting the `IntroTemplate` component in `/components/IndexPage.tsx`.\n\n### How can I set up Incremental Static Revalidation?\n\nGo to the serverless function code in `/pages/api/revalidate.ts`. In the code comments, you'll find instructions for how to set up [ISR][vercel-isr].\n\n## Next steps\n\n- [Join our Slack community to ask questions and get help][sanity-community]\n- [How to edit my content structure?][sanity-schema-types]\n- [How to query content?][sanity-groq]\n- [What is content modelling?][sanity-content-modelling]\n\n[vercel-deploy]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsanity-io%2Fnextjs-blog-cms-sanity-v3\u0026repository-name=blog-nextjs-sanity\u0026project-name=blog-nextjs-sanity\u0026demo-title=Blog%20with%20Built-in%20Content%20Editing\u0026demo-description=A%20Sanity-powered%20blog%20with%20built-in%20content%20editing%20%26%20instant%20previews\u0026demo-url=https%3A%2F%2Fnextjs-blog.sanity.build%2F%3Futm_source%3Dvercel%26utm_medium%3Dreferral\u0026demo-image=https%3A%2F%2Fuser-images.githubusercontent.com%2F81981%2F197501516-c7c8092d-0305-4abe-afb7-1e896ef7b90a.png\u0026integration-ids=oac_hb2LITYajhRQ0i4QznmKH7gx\u0026external-id=nextjs;template=nextjs-blog-cms-sanity-v3\n[integration]: https://www.sanity.io/docs/vercel-integration?utm_source=github.com\u0026utm_medium=referral\u0026utm_campaign=nextjs-v3vercelstarter\n[`.env.local.example`]: .env.local.example\n[nextjs]: https://github.com/vercel/next.js\n[sanity-create]: https://www.sanity.io/get-started/create-project?utm_source=github.com\u0026utm_medium=referral\u0026utm_campaign=nextjs-v3vercelstarter\n[sanity-deployment]: https://www.sanity.io/docs/deployment?utm_source=github.com\u0026utm_medium=referral\u0026utm_campaign=nextjs-v3vercelstarter\n[sanity-homepage]: https://www.sanity.io?utm_source=github.com\u0026utm_medium=referral\u0026utm_campaign=nextjs-v3vercelstarter\n[sanity-community]: https://slack.sanity.io/\n[sanity-schema-types]: https://www.sanity.io/docs/schema-types?utm_source=github.com\u0026utm_medium=referral\u0026utm_campaign=nextjs-v3vercelstarter\n[sanity-github]: https://github.com/sanity-io/sanity/discussions\n[sanity-groq]: https://www.sanity.io/docs/groq?utm_source=github.com\u0026utm_medium=referral\u0026utm_campaign=nextjs-v3vercelstarter\n[sanity-content-modelling]: https://www.sanity.io/docs/content-modelling?utm_source=github.com\u0026utm_medium=referral\u0026utm_campaign=nextjs-v3vercelstarter\n[sanity-webhooks]: https://www.sanity.io/docs/webhooks?utm_source=github.com\u0026utm_medium=referral\u0026utm_campaign=nextjs-v3vercelstarter\n[localhost-3000]: http://localhost:3000\n[localhost-3000-studio]: http://localhost:3000/studio\n[vercel-isr]: https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta\n[vercel]: https://vercel.com\n[vercel-github]: https://github.com/vercel/next.js/discussions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirheimerb%2Fsanity-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirheimerb%2Fsanity-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirheimerb%2Fsanity-blog/lists"}