{"id":19495241,"url":"https://github.com/rodik-dev/local-sanity-starter","last_synced_at":"2026-05-01T23:34:22.156Z","repository":{"id":76766611,"uuid":"454819599","full_name":"rodik-dev/local-sanity-starter","owner":"rodik-dev","description":"Jamstack site created with Stackbit","archived":false,"fork":false,"pushed_at":"2022-02-02T15:02:37.000Z","size":6138,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-08T09:24:58.232Z","etag":null,"topics":["headless","jamstack","nextjs","sanity","ssg","stackbit","static"],"latest_commit_sha":null,"homepage":"https://jamstack.new","language":"JavaScript","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/rodik-dev.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-02-02T15:02:30.000Z","updated_at":"2022-02-02T15:02:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"3cae7da9-1311-45c4-9645-dfcefe442043","html_url":"https://github.com/rodik-dev/local-sanity-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodik-dev%2Flocal-sanity-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodik-dev%2Flocal-sanity-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodik-dev%2Flocal-sanity-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodik-dev%2Flocal-sanity-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodik-dev","download_url":"https://codeload.github.com/rodik-dev/local-sanity-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240740877,"owners_count":19850054,"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":["headless","jamstack","nextjs","sanity","ssg","stackbit","static"],"created_at":"2024-11-10T21:36:43.018Z","updated_at":"2026-05-01T23:34:22.129Z","avatar_url":"https://github.com/rodik-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ✨ Azimuth Nextjs Sanity Theme ✨\n\nThis Stackbit's \"Azimuth\" theme built with [Next.js](https://nextjs.org/) and powered by [Sanity](https://www.sanity.io).\n\nThis theme is deprecated and will no longer be maintained by Stackbit. \nStackbit launched a new major version that brings a superior developer experience and visual editing capabilities.\n\nClick the button below to create a new website using the new version of Stackbit.\n\u003cp align=\"left\"\u003e\n  \u003ca href=\"https://app.stackbit.com/create?utm_source=theme-readme\u0026utm_medium=referral\u0026utm_campaign=stackbit_themes\"\u003e\u003cimg alt=\"Create with Stackbit\" src=\"https://assets.stackbit.com/badge/create-with-stackbit.svg\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n[Live Site demo](https://azimuth-nextjs-sanity.netlify.com/)\n![Azimuth Nextjs Sanity Theme screenshot](https://themes.stackbit.com/images/azimuth-demo-1024x768.png)\n\nThe theme can be used to create a static website that is hosted by a serverless\ndeployment platform such as [Netlify](https://www.netlify.com). The contents of\nthe website are stored in [Sanity.io](https://www.sanity.io/), a Headless CMS.\n\nWhen deploying the website, [Sourcebit](https://github.com/stackbithq/sourcebit)\nfetches the site's contents from Sanity and provides it to Next.js. Once Next.js\nfinishes generating the static website, [Netlify](https://www.netlify.com) pushes\nthe static files to its CDN.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"260\" src=\"docs/nextjs-sourcebit-sanity-diagram.png\"\u003e\n\u003c/p\u003e\n\n[Sourcebit](https://github.com/stackbithq/sourcebit) and its plugins, specifically\n[`sourcebit-source-sanity`](https://github.com/stackbithq/sourcebit-source-sanity)\nand [`sourcebit-target-next`](https://github.com/stackbithq/sourcebit-target-next),\nare used to fetch website contents from Sanity, normalize it, and provide it to\nNext.js pages. It also sets up live updates in development mode allowing to\nupdate the content in CMS and instantly see them in the browser.\n\nThe Next.js [SSG support](https://nextjs.org/blog/next-9-3#next-gen-static-site-generation-ssg-support)\nhas been leveraged to support client side rendering when navigating the internal\nlinks of the site.\n\n\n## Quick Start 🏎\n\n[Create a site](https://app.stackbit.com/create?theme=https://github.com/stackbit-themes/azimuth-nextjs-sanity\u0026utm_source=theme-readme\u0026utm_medium=referral\u0026utm_campaign=stackbit_themes) from this theme using Stackbit.\n\nStackbit will execute following steps for you\n\n- Create a new GitHub repository with the contents of this repository.\n- Create a new [Sanity](https://www.sanity.io) project.\n- Deploy the [Sanity Studio](https://www.sanity.io/studio).\n- Create [Netlify](https://www.netlify.com) site connected to the GitHub repo\n- Deploy the Netlify site.\n- Create a Stackbit project that will allow you edit your website via on-page\n  visual editing experience. \n\nAdditionally, Stackbit will connect all services together:\n\n- Create a \"commit\" webhook in GitHub that will trigger Netlify deployment as\n  soon as new commit is pushed to GitHub.\n- Create a \"publish\" webhook in Sanity that will trigger Netlify deployment as\n  soon as content is published in Sanity.\n\n\n## Editing Content 📝\n\nOnce Stackbit creates a site, you can start editing the content using the free\non-page editing experience provided by the [Stackbit Studio](https://stackbit.com?utm_source=project-readme\u0026utm_medium=referral\u0026utm_campaign=user_themes).\n\n[![](https://i3.ytimg.com/vi/zd9lGRLVDm4/hqdefault.jpg)](https://stackbit.link/project-readme-lead-video)\n\nHere's a few resources to get you started:\n\n- 📺 \u0026nbsp; [Editing Content](https://stackbit.link/project-readme-editing-video)\n- 📺 \u0026nbsp; [Adding, Reordering and Deleting Items](https://stackbit.link/project-readme-adding-video)\n- 📺 \u0026nbsp; [Collaboration](https://stackbit.link/project-readme-collaboration-video)\n- 📺 \u0026nbsp; [Publishing](https://stackbit.link/project-readme-publishing-video)\n- 📚 \u0026nbsp; [Stackbit Documentation](https://stackbit.link/project-readme-documentation)\n\nIf you need a hand, make sure to check the [Stackbit support page](https://stackbit.link/project-readme-support).\n\n\n## Develop Locally 🛠\n\n1. [Create a site](https://app.stackbit.com/create?theme=https://github.com/stackbit-themes/azimuth-nextjs-sanity\u0026utm_source=theme-readme\u0026utm_medium=referral\u0026utm_campaign=stackbit_themes) from this theme using Stackbit.\n\n1. Once finished, you will be redirected to Stackbit Studio where you will be\n   able to edit the content using the free on-page editing experience, and\n   publish new versions of your site.\n\n1. To further develop your site, clone the generated repository.\n\n1. Install dependencies\n\n       run npm install\n\n1. Optionally, run Sanity Studio locally by installing sanity-cli, and then installing and running the studio from the `/studio` directory. You may be required to login with the Sanity CLI.\n\n        npm install -g @sanity/cli\n        cd studio\n        sanity login\n        sanity install\n        sanity start\n\n1. Set the following environment variables locally.\n\n   - `SANITY_PROJECT_ID` - Sanity project ID (you can copy it from the `api.projectId` key in [studio/sanity.json](studio/sanity.json))\n   - `SANITY_DATASET` - Sanity dataset name (optional, default is `production`)\n   - `SANITY_TOKEN` - Sanity read-write token (you can copy it from the \"environment\" section in your Netlify site https://app.netlify.com/sites/\u003cnetlify-site-name\u003e/settings/deploys#environment)\n\n1. Start the Gatsby local development server (run from project root):\n\n        npm run dev\n\n1. Navigate to [http://localhost:3000](http://localhost:3000) to see the site.\n   You can now edit the site contents in the local Sanity Studio, and the\n   browser will live-update your changes. 🎉\n\n\n## Contributing 🙏\n\nTo contribute to this theme please follow the following steps:\n\n1. Clone this repository locally\n\n   ```shell\n   git clone https://github.com/stackbit-themes/azimuth-nextjs-sanity.git\n   ```\n\n1. Install dependencies\n\n   ```shell\n   npm install\n   ```\n\n1. Install Sanity CLI\n\n   ```shell\n   npm install -g @sanity/cli\n   ```\n\n1. Login into Sanity\n\n   ```shell\n   sanity login\n   ```\n\n1. Create an empty Sanity project, and a dataset by running the following command:\n\n   ```shell\n   node sanity-export/create-project.js\n   ```\n   \n   This will create an empty Sanity project and a \"production\" dataset.\n   The output will include the project ID, you will need it in next steps:\n   \n   ```\n   \u003e creating a project...\n   \u003e created a project, projectId: dgaiu42f\n   \u003e creating a dataset...\n   \u003e created a dataset\n   ```\n\n1. Replace the `\u003cproject_id\u003e` in the next command with the value of the\n   `projectId` from the previous step and run it to import the initial\n   theme contents from `sanity-export/export.tar.gz` to the \"production\"\n   dataset:\n\n   ```shell\n   node sanity-export/import.js \u003cproject_id\u003e\n   ```\n\n1. Replace the `SANITY_PROJECT_ID` in [studio/sanity.json](studio/sanity.json)\n   with `projectId`\n\n1. Install and start local Sanity Studio\n\n   ```shell\n   cd studio\n   sanity install\n   sanity start\n   ```\n\n   Sanity studio is now available at http://localhost:3333\n\n1. Define following environment variables to allow Sourcebit to fetch the content\n   from Sanity when developing or building the site locally. You will need to create\n   a \"read-write\" token in your Sanity project settings page \n   (https://manage.sanity.io/projects/__PROJECT_ID__/settings/api)\n\n   ```shell\n   export SANITY_PROJECT_ID=\u003cproject_id\u003e\n   export SANITY_DATASET=production\n   export SANITY_TOKEN=\u003cread_write_token\u003e\n   ```\n\n1. Lastly, run the development server (from project folder):\n\n   ```shell\n   npm run dev\n   ```\n\n   Navigate to [http://localhost:3000](http://localhost:3000) to see the site.\n   You can now edit the site contents in the local Sanity Studio, and the\n   browser will live-update your changes.\n\n1. Once you finish updating the code and contents, export the contents\n   back to the `sanity-export/export.tar.gz` file by running:\n\n   ```shell\n   node sanity-export/export.js \u003cproject_id\u003e\n   ```\n\n1. Set back the `\"projectId\": \"SANITY_PROJECT_ID\"` in [studio/sanity.json](studio/sanity.json)\n\n1. Commit, push and submit a pull-request 🎉\n\n\n## Building for production 🏗\n\nTo build a static site for production, run the following command\n\n    npm run build\n\nThe exported site will be written to `out` folder. The contents of this folder \ncan be deployed by serverless deployment platform such as [Netlify](https://www.netlify.com).\n\n\n## Learn More 📚\n\nTo learn more about Stackbit, take a look at the following resources:\n\n- [Stackbit Documentation](https://www.stackbit.com/docs/)\n- Configure your theme using [stackbit.yaml](https://www.stackbit.com/docs/stackbit-yaml/)\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nTo learn more about Sanity, take a look at the following resources:\n\n- [Sanity Docs](https://www.sanity.io/docs)\n- [Sanity Reference](https://www.sanity.io/docs/reference)\n\nTo learn more about Netlify, take a look at the following resources:\n\n- [Netlify Docs](https://docs.netlify.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodik-dev%2Flocal-sanity-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodik-dev%2Flocal-sanity-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodik-dev%2Flocal-sanity-starter/lists"}