-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gatsby,gatsby-plugin-page-creator): Materialize nodes in gatsbyPa…
…th (#37111)
- Loading branch information
Showing
12 changed files
with
617 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ing/{GatsbyPathMaterializedParent.childType__name}/{GatsbyPathMaterializedParent.name}.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as React from "react" | ||
import { Link, graphql } from "gatsby" | ||
import Layout from "../../../components/layout" | ||
|
||
const MaterializedPage = (props) => ( | ||
<Layout> | ||
<p data-testid="gatsby-path-materialized">{props.data.gatsbyPathMaterializedParent.gatsbyPath}</p> | ||
<Link to="/">Back to home</Link> | ||
</Layout> | ||
) | ||
|
||
export default MaterializedPage | ||
|
||
export const query = graphql` | ||
query { | ||
gatsbyPathMaterializedParent { | ||
name | ||
gatsbyPath( | ||
filePath: "/collection-routing/{GatsbyPathMaterializedParent.childType__name}/{GatsbyPathMaterializedParent.name}" | ||
) | ||
} | ||
} | ||
` |
Oops, something went wrong.