1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-09-11 06:35:24 +03:00

Adjust slug in theme

This commit is contained in:
Brent Jackson 2019-07-28 14:54:02 -04:00
parent cf96ee3d5f
commit 9fdb3c90b6
2 changed files with 3 additions and 3 deletions

View File

@ -5,6 +5,7 @@
"license": "MIT",
"scripts": {
"start": "gatsby develop",
"clean": "gatsby clean",
"build": "gatsby build --prefix-paths",
"serve": "gatsby serve --prefix-paths",
"gh-pages": "npx gh-pages -d public"

View File

@ -105,7 +105,6 @@ exports.createPages = async ({ graphql, actions, reporter, pathPrefix }) => {
const matchPath = [base, '*'].join('/')
const slug = [pathPrefix, base].filter(Boolean).join('')
console.log({ pathPrefix, base, slug, matchPath })
createPage({
path: basePath,
@ -113,15 +112,15 @@ exports.createPages = async ({ graphql, actions, reporter, pathPrefix }) => {
component: DeckTemplate,
context: {
...deck.node,
slug: base,
slug,
},
})
return
}
decks.forEach(({ node }, index) => {
const slug = [pathPrefix, node.slug].filter(Boolean).join('/')
const matchPath = [node.slug, '*'].join('/')
const slug = [pathPrefix, node.slug].filter(Boolean).join('')
createPage({
path: node.slug,