This Next.js starter is powered by TinaCMS for you and your team to visually live edit the structured content of your website. ✨
The content is managed through Markdown and JSON files stored in your GitHub repository, and queried through Tina GraphQL API.
/admin
route.Install the project’s dependencies:
[!NOTE]
Do you know the best package manager for Node.js? Using the right package manager can greatly enhance your development workflow. We recommend using pnpm for its speed and efficient handling of dependencies. Learn more about why pnpm might be the best choice for your projects by checking out this rule from SSW.
pnpm install
Run the project locally:
pnpm dev
This starter can be deployed to GitHub Pages. A GitHub Actions workflow is included that handles the build and deployment process.
To deploy to GitHub Pages:
gh-pages
branch[!NOTE] When deploying to GitHub Pages, you’ll need to update your secrets in Settings | Secrets and variables | Actions to include:
NEXT_PUBLIC_TINA_CLIENT_ID
TINA_TOKEN
You get these from your TinaCloud project - read the docs
[!IMPORTANT] GitHub Pages does not support server side code, so this will run as a static site. If you don’t want to deploy to GitHub pages, just delete
.github/workflows/build-and-deploy.yml
Replace the .env.example
, with .env
NEXT_PUBLIC_TINA_CLIENT_ID=<get this from the project you create at app.tina.io>
TINA_TOKEN=<get this from the project you create at app.tina.io>
NEXT_PUBLIC_TINA_BRANCH=<Specify the branch with Tina configured>
Build the project:
pnpm build
To get help with any TinaCMS challenges you may have:
Install the GraphQL extension to benefit from type auto-completion.
A good way to ensure your components match the shape of your data is to leverage the auto-generated TypeScript types.
These are rebuilt when your tina
config changes.
Licensed under the Apache 2.0 license.