Я хочу использовать данные frontmatter, такие как переменные, в запросе graphql.
>>>frontmatter image width<<<
и >>>frontmatter images extra width<<<
- это место, куда я хочу, чтобы мои width
от frontmatter пошли.
images_extra
- это массив, который, я думаю, усложняет проблему
export const imageQuery = graphql`
query($id: String!) {
markdownRemark(id: { eq: $id }) {
frontmatter {
image {
source {
childImageSharp {
fluid(maxWidth: >>>frontmatter image width<<<, quality: 90) {
...GatsbyImageSharpFluid_withWebp
}
}
}
description
width
}
images_extra {
source {
childImageSharp {
fluid(maxWidth: >>>frontmatter images extra width<<<, quality: 90) {
...GatsbyImageSharpFluid_withWebp
}
}
}
description
width
}
date
title
}
}
}
`