mirror of
https://github.com/kremalicious/gatsby-redirect-from.git
synced 2024-12-22 17:23:24 +01:00
Name query and change reference to query result
This commit is contained in:
parent
1303d79e36
commit
8bc3e67c69
@ -10,7 +10,7 @@ export function createPages({ graphql, actions }, pluginOptions) {
|
|||||||
graphql(
|
graphql(
|
||||||
`
|
`
|
||||||
{
|
{
|
||||||
${markdownQuery}(
|
q: ${markdownQuery}(
|
||||||
filter: { frontmatter: { redirect_from: { ne: null } } }
|
filter: { frontmatter: { redirect_from: { ne: null } } }
|
||||||
) {
|
) {
|
||||||
edges {
|
edges {
|
||||||
@ -32,7 +32,7 @@ export function createPages({ graphql, actions }, pluginOptions) {
|
|||||||
reject(result.errors)
|
reject(result.errors)
|
||||||
}
|
}
|
||||||
|
|
||||||
const allPosts = result.data.allMarkdownRemark.edges
|
const allPosts = result.data.q.edges
|
||||||
|
|
||||||
const redirects = []
|
const redirects = []
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user