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:
parent
cf96ee3d5f
commit
9fdb3c90b6
@ -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"
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user