Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/gatsby-plugin-page-creator/src/gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,20 +190,20 @@ Please pick a path to an existing directory.`,

const hasTrailingSlash = derivedPath.endsWith(`/`)
const path = createPath(derivedPath, hasTrailingSlash, true)
const modifiedPath = applyTrailingSlashOption(path, trailingSlash)

// We've already created a page with this path
if (this.knownPagePaths.has(path)) {
if (this.knownPagePaths.has(modifiedPath)) {
return undefined
}
this.knownPagePaths.add(path)
this.knownPagePaths.add(modifiedPath)
// Params is supplied to the FE component on props.params
const params = getCollectionRouteParams(createPath(filePath), path)
// nodeParams is fed to the graphql query for the component
const nodeParams = reverseLookupParams(node, absolutePath)
// matchPath is an optional value. It's used if someone does a path like `{foo}/[bar].js`
const matchPath = getMatchPath(path)

const modifiedPath = applyTrailingSlashOption(path, trailingSlash)

const componentPath = contentFilePath
? `${absolutePath}?__contentFilePath=${contentFilePath}`
: absolutePath
Expand Down