Skip to content

Instantly share code, notes, and snippets.

@mitchuman
Last active December 27, 2022 22:17
Show Gist options
  • Select an option

  • Save mitchuman/fc40963a4eb720796560bfce73540a0d to your computer and use it in GitHub Desktop.

Select an option

Save mitchuman/fc40963a4eb720796560bfce73540a0d to your computer and use it in GitHub Desktop.
templates

This is a monorepo project that uses Next.js as the frontend framework, Tailwind CSS for styling, Sanity for content management, and Netlify for hosting.

Quick Links

Resources

Workflow

0. Pull latest changes.

git pull

💡 Recommeded: work in git branches, and merge to master when ready to deploy.

1. Start local servers.

Sanity

# Start Sanity studio (if edits to the content schema need to be made)
# ./packages/sanity
yarn start

Next.js

# Start Next.js server
# ./packages/nextjs
yarn dev

2. Make edits.

After schema updates are complete and are ready to be used in the frontend, make sure to run the following command to update the GraphQL schema to use in Gatsby.

Sanity

# Update GraphQL schema
# ./packages/sanity
yarn graphql

3. Deploy edits.

Sanity

# Deploy Sanity studio (if edits to the schema have been made)
# ./packages/sanity
yarn deploy

Merge edits to master branch and a Netlify deploy will be triggered automatically, updating the live site.

git checkout master
git merge <branch>
git push

👨‍💻 with ❤️ by Human

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment