Blog for NextJS and Sanity CMS
Table of Contents
An easy to set up blog built in NextJS and integrated with Sanity CMS.
Check it out: loom vercel
Ensure you create a file called '.env.local' in the root folder. Populate these values in it from your sanity and hcaptcha accounts.
NEXT_PUBLIC_SANITY_DATASET=production
NEXT_PUBLIC_SANITY_PROJECT_ID=
SANITY_API_TOKEN=
NEXT_PUBLIC_HCAPTCHA_SITE_KEY=
HCAPTCHA_SECRET_KEY=
HCAPTCHA_VERIFY_URL="https://hcaptcha.com/siteverify"
NEXT_PUBLIC_TEST_HCAPTCHA_SITE_KEY=10000000-ffff-ffff-ffff-000000000001
TEST_HCAPTCHA_SECRET_KEY=0x0000000000000000000000000000000000000000
For santiy studio, add a santiy.json file to the root of your loom-santiy folder:
{
"root": true,
"project": {
"name": "loom-sanity"
},
"api": {
"projectId": "ENTER-SANTIY-PROJECT-ID-HERE",
"dataset": "production"
},
"plugins": [
"@sanity/base",
"@sanity/default-layout",
"@sanity/default-login",
"@sanity/desk-tool"
],
"env": {
"development": {
"plugins": [
"@sanity/vision"
]
}
},
"parts": [
{
"name": "part:@sanity/base/schema",
"path": "./schemas/schema"
}
]
}
Get started on your own machine.
- Clone the repo
git clone https://github.com/jotcodeofficial/loom.git
- Install the NPM packages
npm install
- Build the project
npm run dev
- View it on your browser
localhost:3000
Sanity schema for the posts can be found in the loom-sanity/schemas folder.
Great things are a sum of their parts. By contributing your time and effort you can help make this project even better. Collaborative efforts ftw. Check out the issues to see potential items you can contribute on.
Here is where you can provide the license you are using. Released under the MIT License.
If you are not a coder you can still help support the project by sharing it far and wide. Thanks! ❤️