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
Currently it is not easily possible to have markdown in frontmatter tags while using this plugin (e.g. using netlifyCMS with a markdown fields other than Body).
Currently I am creating new nodes for these frontmatter fields
However transformer remark only copies the absolutePath in case its a File node (which it clearly isnt).
So I would need some way to indicate the absolute path in the remark node or maybe have some other field conveying the path.
Currently the code only works if the markdown node has a fileAbsolutePath (see https://github.com/danielmahon/gatsby-remark-relative-images/blob/master/src/on-create-node.ts#L29), which is not the case for me and therefore the plugin crashes currently.
"gatsby-remark-relative-images" threw an error while running the onCreateNode lifecycle:
The "path" argument must be of type string. Received type undefined
Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
- validators.js:112 validateString
internal/validators.js:112:11
- on-create-node.js:15 Object.exports.onCreateNode
[gatsby-starter-netlify-cms]/[gatsby-remark-relative-images]/dist/on-create-node.js:15:42
- api-runner-node.js:330 runAPI
[gatsby-starter-netlify-cms]/[gatsby]/src/utils/api-runner-node.js:330:22
- api-runner-node.js:440 Promise.catch.decorateEvent.pluginName
[gatsby-starter-netlify-cms]/[gatsby]/src/utils/api-runner-node.js:440:17
- From previous event:
- api-runner-node.js:440 Promise.catch.decorateEvent.pluginName
[gatsby-starter-netlify-cms]/[gatsby]/src/utils/api-runner-node.js:440:9
- From previous event:
- api-runner-node.js:439
[gatsby-starter-netlify-cms]/[gatsby]/src/utils/api-runner-node.js:439:14
The text was updated successfully, but these errors were encountered:
in case you created markdown nodes
programmatically (e.g. since you want
to process markdown content in
frontmatter fields), you can
now provide a custom resolver function
that calculates the correct path for
the markdown content.
Fixesdanielmahon#43
Currently it is not easily possible to have markdown in frontmatter tags while using this plugin (e.g. using netlifyCMS with a
markdown
fields other thanBody
).Currently I am creating new nodes for these frontmatter fields
(similar to the suggestion here hygraph/gatsby-source-graphcms#44 (comment))
However transformer remark only copies the
absolutePath
in case its aFile
node (which it clearly isnt).So I would need some way to indicate the absolute path in the remark node or maybe have some other field conveying the path.
Currently the code only works if the markdown node has a
fileAbsolutePath
(see https://github.com/danielmahon/gatsby-remark-relative-images/blob/master/src/on-create-node.ts#L29), which is not the case for me and therefore the plugin crashes currently.The text was updated successfully, but these errors were encountered: