I'm following the Gatsby tutorial, but instead of using the MDX transformer, I'd like to use the officially-supported Asciidoc one (gatsby-transformer-asciidoc). In the part 6 of tutorial, a page query is used to retrieve the correct content, and then render it to a page. To get hold of the actual content, the tutorial says it "will be passed as a children prop to the page component".
However, with the gatsby-transformer-asciidoc plugin, that doesn't appear to be the case. Is there some convention that transformer plugins have to follow for their content to be passed through as children when a page query executes? And is gatsby-transformer-asciidoc not following it?
As a workaround, the content itself is available in the GraphQL query as html. I'm setting that on a JSX element with dangerouslySetInnerHtml, which seems to work, but it feels like I'm going about it the wrong way. Any advice?
Here's the GraphQL page query I'm using, if its helpful:
query GetAsciidoc($id: String) {
asciidoc(id: {eq: $id}) {
document {
title
}
pageAttributes {
date
}
html
}
}