diff --git a/gatsby-node.js b/gatsby-node.js index ded5911..262dd45 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -110,7 +110,7 @@ const createAsciiDocPages = async({createPage, graphql, reporter}) => { return; } result.data.allAsciidocCopy.edges.forEach(({ node }) => { - const slug = `/docs/${node.document.title.replace(/(.*\/)?/, '')}`; + const slug = `/docs/${node.document.title.replace(/(.*\/ ?)?/, '')}`; createPage({ path: slug, component: docTemplate,