Skip to content

Commit 2d4551e

Browse files
committed
fix: Deal with colons in page titles
1 parent 4fb075a commit 2d4551e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pull.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ async function outputPage(page: NotionPage) {
191191
// console.log(JSON.stringify(mdBlocks, null, 2));
192192
// }
193193
let frontmatter = "---\n";
194-
frontmatter += `title: ${page.nameOrTitle.replaceAll(":", ":")}\n`; // markdown can't handle the ":" here
194+
frontmatter += `title: ${page.nameOrTitle.replaceAll(":", "-")}\n`; // I have not found a way to escape colons
195195
frontmatter += `sidebar_position: ${currentSidebarPosition}\n`;
196196
frontmatter += `slug: ${page.slug ?? ""}\n`;
197197
if (page.keywords) frontmatter += `keywords: [${page.keywords}]\n`;

0 commit comments

Comments
 (0)