You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, firstly, many thanks for this repo, so helpful (using this to migrate a personal project from Elm). Have it almost working, just some misunderstanding of the way the layouts are working.
I guess this works on something to do with: useLangKeyLayout: true in the gatsby.config.js file, right? Then you have your en.js layout, etc.
I'm not exactly sure if I should be importing this intl functionality to the template, or if I need to wire up the layout files for this Contentful scenario, or both. New enough to practical application of React also, so my knowledge can be lacking a bit also. Cheers!
The text was updated successfully, but these errors were encountered:
mccrodp
changed the title
Making this work with Contentful Example
Making this work with Contentful Example: Missing Message error
Feb 6, 2018
Hey, firstly, many thanks for this repo, so helpful (using this to migrate a personal project from Elm). Have it almost working, just some misunderstanding of the way the layouts are working.
I guess this works on something to do with:
useLangKeyLayout: true
in the gatsby.config.js file, right? Then you have youren.js
layout, etc.I've followed the Contentful example here: https://github.com/gatsbyjs/gatsby/blob/master/examples/using-contentful/src/layouts/index.js
I have tried to integrate the 2 concepts, but due the the way the layouts are perhaps, I get the below error:
My add-menu branch here shows how this is setups (simple enough at the moment). https://github.com/ahimsayoga/ahimsayogajp/blob/add-menu/src/layouts/index.js
The only real difference is the content is dynamic from Contentful and it uses
gatsby.node.js
to import content: https://github.com/ahimsayoga/ahimsayogajp/blob/add-menu/gatsby-node.js#L12It points to a template
general.js
: https://github.com/ahimsayoga/ahimsayogajp/blob/add-menu/src/templates/general.jsI'm not exactly sure if I should be importing this intl functionality to the template, or if I need to wire up the layout files for this Contentful scenario, or both. New enough to practical application of React also, so my knowledge can be lacking a bit also. Cheers!
The text was updated successfully, but these errors were encountered: