This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent gatsby file detection from breaking path field (#1226)
Fixes #1088 This should fix the path issues that people intermittently run into. Gatsby sees the relative path (and the parent node with an absolute path), joins on the parent path and the relative path, and presumes it's a file... which is normally good, but which here is not what we want beacuse then we're getting a resolver of type file instead of type string referring to the relative path of the document. This seems to fix a (long standing?) bug where the "Edit this Page" button is broken, as well. e.g. see [this page](https://reactjs.org/community/support.html) which _should_ have an Edit this Page button I'd need to think more as to whether there's a cleaner fix here, but this seems to work pretty well!
- Loading branch information
1 parent
f2d39be
commit 7d12082
Showing
7 changed files
with
11 additions
and
18 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
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
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 |
---|---|---|
|
@@ -33,9 +33,7 @@ export const pageQuery = graphql` | |
prev | ||
} | ||
fields { | ||
path { | ||
id | ||
} | ||
path | ||
slug | ||
} | ||
} | ||
|
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 |
---|---|---|
|
@@ -38,9 +38,7 @@ export const pageQuery = graphql` | |
prev | ||
} | ||
fields { | ||
path { | ||
id | ||
} | ||
path | ||
slug | ||
} | ||
} | ||
|
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 |
---|---|---|
|
@@ -36,9 +36,7 @@ export const pageQuery = graphql` | |
prev | ||
} | ||
fields { | ||
path { | ||
id | ||
} | ||
path | ||
slug | ||
} | ||
} | ||
|