Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .dev.vars.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# The secrets the Deploy to Cloudflare button asks for. Cloudflare reads this
# file instead of .env.example, so list only what the deploy needs here.
# The Deploy to Cloudflare button turns every uncommented line in this file into
# a required field on its form. These lines are commented out on purpose: the
# keys are build variables, which TinaCloud (or you, see the README) add after
# the deploy, so the form should not ask for them.
# For local development, copy .env.example to .env instead.
NEXT_PUBLIC_TINA_CLIENT_ID=
TINA_TOKEN=
# NEXT_PUBLIC_TINA_CLIENT_ID=
# TINA_TOKEN=
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ myEmbed: (props) => <MyEmbed {...props} />,

## Environment

`.dev.vars.example` lists only the secrets the Deploy to Cloudflare button asks for; Cloudflare reads it instead of `.env.example`. For local development, copy `.env.example`. Required: `NEXT_PUBLIC_TINA_CLIENT_ID`, `TINA_TOKEN`, `NEXT_PUBLIC_TINA_BRANCH` (from app.tina.io). Optional: `NEXT_PUBLIC_SITE_URL`, `NEXT_PUBLIC_GTM_ID`, `NEXT_PUBLIC_BASE_PATH`, `DEPLOY_ADAPTER` (`cloudflare` forces a Cloudflare Workers build; any other value forces the default output).
`.dev.vars.example` has its variables commented out so the Deploy to Cloudflare button asks for none; Cloudflare reads it instead of `.env.example`. For local development, copy `.env.example`. Required: `NEXT_PUBLIC_TINA_CLIENT_ID`, `TINA_TOKEN`, `NEXT_PUBLIC_TINA_BRANCH` (from app.tina.io). Optional: `NEXT_PUBLIC_SITE_URL`, `NEXT_PUBLIC_GTM_ID`, `NEXT_PUBLIC_BASE_PATH`, `DEPLOY_ADAPTER` (`cloudflare` forces a Cloudflare Workers build; any other value forces the default output).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ TinaDocs works great with Vercel. Check out our [deployment guide](https://tina.

TinaDocs runs on Cloudflare Workers with [OpenNext](https://opennext.js.org/cloudflare). When Workers Builds builds your site, it builds a Worker instead of the default Next.js output; nothing changes for Vercel.

1. Click the button and follow the steps. Cloudflare sets up a Worker that builds from your copy of this repository with Workers Builds. The form asks only for `NEXT_PUBLIC_TINA_CLIENT_ID` and `TINA_TOKEN`, the secrets listed in `.dev.vars.example`.
1. Click the button and follow the steps. Cloudflare sets up a Worker that builds from your copy of this repository with Workers Builds. The form has nothing to fill in.
2. Add these as **build** variables in your Worker's Workers Builds settings ([docs](https://developers.cloudflare.com/workers/ci-cd/builds/configuration/)). Runtime variables and secrets are not visible to the build.
- `NEXT_PUBLIC_TINA_CLIENT_ID` and `TINA_TOKEN` (required, from [app.tina.io](https://app.tina.io))
- `NEXT_PUBLIC_SITE_URL` (optional, used for the sitemap)
Expand Down
10 changes: 0 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,5 @@
"tailwindcss": "^4.1.8",
"worker-loader": "^3.0.8",
"wrangler": "^4.155.0"
},
"cloudflare": {
"bindings": {
"NEXT_PUBLIC_TINA_CLIENT_ID": {
"description": "Client ID from your project at [app.tina.io](https://app.tina.io). `tinacms build` needs it at **build** time, so also add it as a Workers Builds build variable."
},
"TINA_TOKEN": {
"description": "Read-only token from [app.tina.io](https://app.tina.io). Also add it as a Workers Builds **build** variable."
}
}
}
}
Loading