Open i-bsd opened 5 years ago
This isn't supported yet. But #5 will bring in support 😄
This can probably be closed now, as MDX support has been merged
Excellent. Thanks. Any changes need to be made to my query for it to work?
Excellent. Thanks. Any changes need to be made to my query for it to work?
Although this change has been merged, I don't believe a new version has been released. Docs on how to use (when it is released) have been added in #7
If you're super stuck and need to move on, you can create a copy of this plugin in your Gatsby setup as a local plugin. You can then remove it once the MDX feature has been released.
Hey @tgallacher, thanks for sharing this intel :+1:
I was just wondering why it isn't working for me either. I see that the changes are already in 1.0.1
and that's the package version I'm using, but apparently it's still not there yet.
I'll follow your suggestion on using this as a local plugin. Hopefully, this gets published soon since it's quite a helpful package.
Hey @tgallacher, thanks for sharing this intel 👍
I was just wondering why it isn't working for me either. I see that the changes are already in
1.0.1
and that's the package version I'm using, but apparently it's still not there yet.I'll follow your suggestion on using this as a local plugin. Hopefully, this gets published soon since it's quite a helpful package.
Yup, hopefully this is released soon (i'm also using the local plugin approach as a workaround). The changes are in master
, but not in a tagged release yet. Version 1.0.1
is from 1 year ago from what I can tell, but hopefully this will be released soon.
thanks
y'all... gatsby-transformer-remark
supports a timeToRead
out-of-the-box 🤯just found this out
y'all...
gatsby-transformer-remark
supports atimeToRead
out-of-the-box 🤯just found this out
I'm not sure it's working good tho. I got 1
for pretty long posts.
I had a similar error like Unknown field 'readingTime' on type allMdx with a query like:
query {
allMdx(sort: { frontmatter: { date: ASC } }, limit: 1000) {
nodes {
id
frontmatter {
slug
}
fields {
readingTime {
text
}
}
}
}
}
and I changed node.rawBody
to node.body
in gatsby-node.js
in the node_modules/gatsby-remark-reading-time
folder and the query started working.
} else if (node.internal.type === `Mdx`) {
createNodeField({
node,
name: `readingTime`,
value: readingTime(node.body)
});
}
maybe it has something to do with the Gatsby version? (I was using Gatsby 5.5.0)
Switched over to MDX. All configuration for
gatsby-remark-reading-time
left the same.Doesn't seem to be compatible:
Using this query: