when I query the data through grapghql, it includes them all inside a html node not independent nodes
let's say that I have inserted two title tags to the CMS and I want to use those tags inside of a component
query BlogPostByPath {
markdownRemark {
html
frontmatter {
path
title
}
}
}
it would generate this:
{
"data": {
"markdownRemark": {
"html": "<p>test</p> <p>another test</p>",
"frontmatter": {
"path": "testPath",
"title": "test"
}
}
}
}
the question is: how can I grab the first p tag and use it inside of a component and the other p tag to be inserted inside of another component inside the main component? like how can I have control on how the html node gives data
and assuming the fact that I don't want to insert them inside of several child components, let's say that I want the first p tag to have a specific style and the second p tag to have another style
it would make more sends if there is a way to access to specific elements inside the html node