Skip to content

Commit

Permalink
fix(gatsby-theme-blog-core): Normalize trailing slashes (#17871)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRGould authored and GatsbyJS Bot committed Oct 15, 2019
1 parent 3d38af2 commit aedd569
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions themes/gatsby-theme-blog-core/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ exports.onCreateNode = async (

slug = urlResolve(basePath, filePath)
}
// normalize use of trailing slash
slug = slug.replace(/\/*$/, `/`)
const fieldData = {
title: node.frontmatter.title,
tags: node.frontmatter.tags || [],
Expand Down

0 comments on commit aedd569

Please sign in to comment.