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 {
9999 if ( explicitSlug ) return explicitSlug ;
100100 return encodeURIComponent (
101101 this . nameOrTitle . toLowerCase ( ) . replaceAll ( " " , "-" )
102- ) ;
102+ )
103+ . replaceAll ( "%3A" , "-" )
104+ . replaceAll ( "--" , "-" ) ;
103105 }
104106 public get keywords ( ) : string | undefined {
105107 return this . getPlainTextProperty ( "Keywords" , "" ) ;
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ async function outputPage(page: NotionPage) {
169169 let frontmatter = "---\n" ;
170170 frontmatter += `title: ${ page . nameOrTitle . replaceAll ( ":" , ":" ) } \n` ; // markdown can't handle the ":" here
171171 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` ;
173173 if ( page . keywords ) frontmatter += `keywords: [${ page . keywords } ]\n` ;
174174
175175 frontmatter += "---\n" ;
You can’t perform that action at this time.
0 commit comments