This example demonstrates how a Next.js Website can be filled with content served by Commitspark, the workflow-first Content Management System based on Git and GraphQL.
- Ensure you have created a copy of the example content repository
- Ensure you have created a copy of this application repository
- Check out the application repository copy on your local machine
- Obtain a GitHub Personal Access Token (see the GitHub adapter documentation for details)
- Copy
.env.dist
to.env
- Edit
.env
and enter the location of your copied content repository as well as your personal access token - Install dependencies with
npm i
- Launch the application with
npm run dev
Open http://localhost:3000 with your browser to see an example website driven by Commitspark from your Git content repository.
To edit content, sign in with GitHub at Commitspark, browse to your copy of the content repository and start editing.
To see content from a branch other than main
in Next.js, change the PUBLISHED_BRANCH
variable in .env
.