Skip to content

Commit

Permalink
Post custom slugs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BrightKrystian committed May 7, 2024
1 parent 287ba63 commit 7e05fa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gatsby-node.ts
Expand Up @@ -504,7 +504,7 @@ export const onCreateNode: GatsbyNode['onCreateNode'] = async ({ node, actions:
}

const nodeSlug = (node.frontmatter as any)?.slug
? (node.frontmatter as any)?.slug
? '/' + nodeFilePath.split('/').splice(-2).at(0) + '/' + (node.frontmatter as any)?.slug
: '/' + nodeFilePath.split('/').splice(-2).join('/').replace('.md', '')

createNodeField({
Expand Down

0 comments on commit 7e05fa5

Please sign in to comment.