Hi Friends, I am new to prismic at the moment I am struggling to understand how to configure this linkResolver. There is lot doc out there but it is random at each phase. All I need to do is simple one.
I have this plugin 'gatsby-source-prismic', and this is my linkresolver function under gatsbyconfig.js
I am trying to understand when this configuration will get called. console log does not even get called.
And i am not abble to call different index.jsx based on the doc type
linkResolver: ({ node, key, value }) => (doc) => {
// Pretty URLs for known types
if (doc.type === 'blog') return "/post/" + doc.uid;
if (doc.type === 'page') return "/" + doc.uid;
// Fallback for other types, in case new custom types get created
return "/doc/" + doc.id;
},