File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,9 @@ export class NotionPage {
99
99
if ( explicitSlug ) return explicitSlug ;
100
100
return encodeURIComponent (
101
101
this . nameOrTitle . toLowerCase ( ) . replaceAll ( " " , "-" )
102
- ) ;
102
+ )
103
+ . replaceAll ( "%3A" , "-" )
104
+ . replaceAll ( "--" , "-" ) ;
103
105
}
104
106
public get keywords ( ) : string | undefined {
105
107
return this . getPlainTextProperty ( "Keywords" , "" ) ;
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ async function outputPage(page: NotionPage) {
169
169
let frontmatter = "---\n" ;
170
170
frontmatter += `title: ${ page . nameOrTitle . replaceAll ( ":" , ":" ) } \n` ; // markdown can't handle the ":" here
171
171
frontmatter += `sidebar_position: ${ currentSidebarPosition } \n` ;
172
- frontmatter += `slug: ${ page . slug . replaceAll ( ":" , "-" ) ?? "" } \n` ; // markdown can't handle the ":" or ":" here
172
+ frontmatter += `slug: ${ page . slug ?? "" } \n` ;
173
173
if ( page . keywords ) frontmatter += `keywords: [${ page . keywords } ]\n` ;
174
174
175
175
frontmatter += "---\n" ;
You can’t perform that action at this time.
0 commit comments