I’m fairly new to Redwood, mainly been using Gatsby recently.
I took a look at prerendering and I’m not totally sure if it meets the needs I have for this project. I would need to be able to statically generate pages using a CMS (with i18n), and also have some dynamic stuff on the frontend that would take advantage of Redwood Cells/API and auth.
Is this something that’s been done with Redwood before? Or would I have to run my own implementation of SSG and translations?
EDIT: I’ve seen a thread about using both Gatsby and Redwood for a project, but the main issue is that even the dynamic pages with Redwood would still have copy/text/forms that are generated by the CMS.
Welcome @davidli3100! My understanding is that right now, you can prerender entirely static pages (no data fetching during build) only. They are rehydrated client-side in the browser, and you can do whatever you want with them there in terms of dynamic data fetching. What you can’t do is build for example a static page that’s a list of all the records in a collection, where you have to fetch the collection when you build the static page server(less)-side.
My understanding also is that the prerender package might also include dynamic data fetching during static generation at some point in the future. There was a message at one point that said the core team felt like it was a critical thing to do right, and won’t be in the v1 release.
@dthyresson that’s a really great idea. I did it with Hasura just playing around and following a tutorial. Two headless CMS vendors that provide native GraphQL APIs are Sanity and GraphCMS. Sanity has a JS client. I don’t see one for GraphCMS.
And then you could have a hook that would feed back the translations and data into presentational components for pre-rendering (pretty sure JSON is included in pre-rendering as a static asset?). Gonna take a look at Netlify On-demand builders though, it seems promising