With other plugins which create a node for the markdown, I do something like the below:
exports.onCreateNode = ({ node, actions, createNodeId }) => {
if (node.internal.type === "article") {
const newNode = {
...node,
id: createNodeId(`Article-${node.id}-markdown`),
parent: node.id,
children: [],
internal: {
type: "StrapiArticleMarkdown",
mediaType: "text/markdown",
content: node.body || " ",
contentDigest: digest(node)
}
};
actions.createNode(newNode);
actions.createParentChildLink({
parent: node,
child: newNode,
});
}
};