diff --git a/gatsby-node.js b/gatsby-node.js index 2f5d0c987..e06ad9448 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -72,11 +72,13 @@ exports.createPages = ({ graphql, actions }) => { tags.forEach(tag => { const tagPath = `/tag/${toKebabCase(tag)}/`; + const tagRegex = `/^\\s*${tag}/`; createPage({ path: tagPath, component: tagPage, context: { tag, + tagRegex, }, }); });