Moving Hugo site from Forestry to TinaCMS
Hugo
Tina only uses YAML, so convert all your toml pages and posts to YAML:
hugo convert toYAML --unsafe
Build hugo to test
hugo
hugo server
TinaCMS
Create new project in Tina Cloud.
Application IDs under "Overview" will have the Client ID you need for the step below.
Create read-only token for your new site under "Tokens"
You will the Token for the build step below:
Forestry migration is now built into TinaCMS tool, so simply:
npx @tinacms/cli@latest init
- Paste in your IDs above.
- Choose yarn.
- No to Typescript.
- Choose Hugo.
Development mode:
yarn tinacms dev -c "hugo server -D"
Production mode:
yarn tinacms build && hugo
Push to git
Push all changes to git
git add .
git commit -m "added tinacms"
git pull
git push
Netlify
Adding to Netlify
Build command:
yarn tinacms build && hugo
Add the build site URL to Tina Cloud under Configuration.