Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨TinaCMS - Create a Gatsby Starter #1588

Open
4 tasks done
bradystroud opened this issue Oct 22, 2024 · 4 comments
Open
4 tasks done

✨TinaCMS - Create a Gatsby Starter #1588

bradystroud opened this issue Oct 22, 2024 · 4 comments
Assignees
Labels
TinaCMS Relates to TinaCMS migration

Comments

@bradystroud
Copy link
Member

bradystroud commented Oct 22, 2024

CC: @JackDevAU

Description

Create a Gatsby Starter that integrates TinaCMS based on the provided proof of concept (POC) repository at https://github.com/JackDevAU/tinatsby_doc. The starter needs to be cleaned up, a custom build script must be added (since Vercel's automagic build script cannot be used), and documentation should be written and published on tina.io.

Acceptance Criteria

@JackDevAU
Copy link
Member

Copied from a chat with Hugo

I made a quick update video for you regarding the Gatsby x Tina starter: https://youtu.be/PCOTqD6VJhc

You can see that it works without skipping the client so that's pretty nice! I'd love to get your opinion about this, especially the CORS issue I mention at the end.

Here is the link to the repo, I made it public so you should have access: https://github.com/Freego1783/tina-gatsby-test

@isaaclombardssw
Copy link
Member

Note – if the Gatsby starter we build is actually a viable solution... should we try and get on here (Gatsby plugin library)?

Image

@Freego1783
Copy link
Member

Hey @JackDevAU,

The key point for making Gatsby play nicely with Tina was to force the version of graphql to be the one expected by Tina. To achieve this we used a resolutions property in the package.json file.

After that everything went relatively well, except when we deployed on Vercel we had some problems with the visual editing in admin mode because Tina uses an iframe to display the content and we were experiencing CORS issues. To fix that we had to add a headers config in gatsby-config.ts, but I think it's a bit too permissive and we should probably make it better.

What do you think?

@Freego1783
Copy link
Member

Hey @JackDevAU

Looks like both PRs are ready to be merged but I cannot do it myself. Can you do it 🙂?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TinaCMS Relates to TinaCMS migration
Projects
None yet
Development

No branches or pull requests

6 participants