File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -143,14 +143,14 @@ async function getPagesRecursively(
143143}
144144
145145async function outputPage ( page : NotionPage ) {
146+ console . log ( `Reading Page ${ page . context } /${ page . nameOrTitle } ` ) ;
147+
146148 const blocks = ( await page . getBlockChildren ( ) ) . results ;
147149
148150 await outputImages ( blocks ) ;
149151
150152 currentSidebarPosition ++ ;
151153
152- console . log ( `Reading Page ${ page . context } /${ page . nameOrTitle } ` ) ;
153-
154154 if ( page . type === PageType . DatabasePage && page . status !== "Publish" ) {
155155 console . log (
156156 notice ( `Skipping page because status is not Publish: ${ page . nameOrTitle } ` )
@@ -167,9 +167,9 @@ async function outputPage(page: NotionPage) {
167167 // console.log(JSON.stringify(mdBlocks, null, 2));
168168 // }
169169 let frontmatter = "---\n" ;
170- frontmatter += `title: ${ page . nameOrTitle } \n` ;
170+ frontmatter += `title: ${ page . nameOrTitle . replaceAll ( ":" , ":" ) } \n` ; // markdown can't handle the ":" here
171171 frontmatter += `sidebar_position: ${ currentSidebarPosition } \n` ;
172- frontmatter += `slug: ${ page . slug ?? "" } \n` ;
172+ frontmatter += `slug: ${ page . slug . replaceAll ( ":" , "-" ) ?? "" } \n` ; // markdown can't handle the ":" or ":" here
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