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(
143
143
}
144
144
145
145
async function outputPage ( page : NotionPage ) {
146
+ console . log ( `Reading Page ${ page . context } /${ page . nameOrTitle } ` ) ;
147
+
146
148
const blocks = ( await page . getBlockChildren ( ) ) . results ;
147
149
148
150
await outputImages ( blocks ) ;
149
151
150
152
currentSidebarPosition ++ ;
151
153
152
- console . log ( `Reading Page ${ page . context } /${ page . nameOrTitle } ` ) ;
153
-
154
154
if ( page . type === PageType . DatabasePage && page . status !== "Publish" ) {
155
155
console . log (
156
156
notice ( `Skipping page because status is not Publish: ${ page . nameOrTitle } ` )
@@ -167,9 +167,9 @@ async function outputPage(page: NotionPage) {
167
167
// console.log(JSON.stringify(mdBlocks, null, 2));
168
168
// }
169
169
let frontmatter = "---\n" ;
170
- frontmatter += `title: ${ page . nameOrTitle } \n` ;
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 ?? "" } \n` ;
172
+ frontmatter += `slug: ${ page . slug . replaceAll ( ":" , "-" ) ?? "" } \n` ; // markdown can't handle the ":" or ":" here
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