- Copy local environment variables
cp .env.example .env.local
and fill out with Sanity Studio Project Id and DataSet. These can be found within the Sanity Studio settings after logging in. - Install dependencies for project and local version of studio.
yarn && cd ./studio $$ yarn
- Run NextJS development
yarn dev
- Project will start up at
http://localhost:3000
- Project will start up at
- Second terminal run the studio locally if desired, but not requried, content is pulled from the CMS.
yarn studio
- Studio will start up at
http://localhost:3333/desk
- Studio will start up at
- Vercel
- Hosting
- Deployment and Preview
- Domain
- 2 seprate projects Media Jams and the content studio
- Generated webhooks when Sanity Content is published to start a new build
- Next.js
- Meida Jams Site and api fuctions
- Sanity IO
- Content Management System
- Prod dataset and Staging datasets
- Studio
- Github
- Repository hosting
main
is the deployed live version of Media Jamsdev
is the working branch that uses Prod Data from Sanity & Hasura https://stage.mediajams.dev/- Workflow:
- Feature Branch from
dev
- Work with staging data locally for both the studio and jams site
- Pull Request back to
dev
- Once merged the published
dev
branch will reflect what the live site will. - Pull Request
dev
tomain
. This will promote any changes indev
to the live site. - This also includes any data format / changes in the sanity schema specificly for the GraphQL Endpoints from Sanity
- Feature Branch from
- Workflow:
- Testing
- Github actions run
yarn test
on push - Setup with Jest, Test-library, mocks
- Minimal to little coverage at the moment
- Github actions run
- SendGrid
- Email Provider
- Currently tasked with content updates for creators and modorators
- Notifications are sent out when the workflow state of a Media Jams is changed. Either to the author for changes, or to the moderation group for requests.
- Google Analytics
- Analytics
- Concentration on traffic and time spend on Jams
- Search queries are recored and ranked
- Overall time spend on a Jam, if read completely, and interaction with the CodeSandbox
- CodeSandbox
- Jams have an interactive project element to them specificly using CodeSandbox
- Using a Custom MDX component in the Jam Content it's rendered as an iFrame with specific attributes.
- Including using MirrorCode and 'click to load' to help reduce the time to interact
- Options include having a specific file and | or preview panel open.
Redirects are managed via the Next.js Config Redirects feature.
/post/:slug
paths are directed tohttps://cloudinary.com/blog/guest_post/:slug
- Special identified routes are remapped as needed, i.e.
.
is replaced with-
on a special set of slugs - The redirect is temporary for now because the eventual target URI will be
https://cloudinary.com/blog/:slug
- Special identified routes are remapped as needed, i.e.
/author/:path
paths are directed tohttps://cloudinary.com/blog/author/:path
using a permanent redirect/
is redirected tohttps://cloudinary.com/blog
- All doc routes are redirected to
https://cloudinary.com