File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const processMdxEntry = ({ children: [entry] }) => {
17
17
fileAbsolutePath,
18
18
mdxAST,
19
19
objectID,
20
- frontmatter : { title, redirect } ,
20
+ frontmatter : { title, redirect, slug : customSlug } ,
21
21
} = entry ;
22
22
if ( redirect ) {
23
23
// avoid pushing empty records
@@ -41,13 +41,15 @@ const processMdxEntry = ({ children: [entry] }) => {
41
41
. slice ( 0 , - 1 )
42
42
. join ( '/' ) ;
43
43
const path = `/${ cutStrippedDirectory } /${ title . replace ( / \/ / g, '-' ) } ` ;
44
- const slug = compose (
45
- noTrailingSlash ,
46
- dedupePath ,
47
- removeGuidesAndRedirectWelcome ,
48
- unorderify ,
49
- slugify ,
50
- ) ( path ) ;
44
+ const slug =
45
+ customSlug ||
46
+ compose (
47
+ noTrailingSlash ,
48
+ dedupePath ,
49
+ removeGuidesAndRedirectWelcome ,
50
+ unorderify ,
51
+ slugify ,
52
+ ) ( path ) ;
51
53
const chunks = chunk ( mdxAstToPlainText ( mdxAST ) , 300 ) ;
52
54
let pointer = chunks . length ;
53
55
const cache = new Array ( pointer ) ;
@@ -86,6 +88,7 @@ const docPagesQuery = `{
86
88
frontmatter {
87
89
title
88
90
redirect
91
+ slug
89
92
}
90
93
mdxAST
91
94
fileAbsolutePath
You can’t perform that action at this time.
0 commit comments