Skip to content
This repository was archived by the owner on Nov 14, 2021. It is now read-only.

Commit 9330191

Browse files
committed
fix: create page directory option's link
1 parent a1b2451 commit 9330191

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

narkdown/exporter.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,14 @@ def parse_notion_blocks(self, blocks, path, created_time, offset):
330330
sub_path=path,
331331
created_time=created_time,
332332
)
333-
contents += "[{0}]({1}/{1}.md)".format(
334-
block.title, block.title.replace(" ", "-")
335-
)
333+
if self.create_page_directory:
334+
contents += "[{0}]({1}/{1}.md)".format(
335+
block.title, block.title.replace(" ", "-")
336+
)
337+
else:
338+
contents += "[{0}](./{1}.md)".format(
339+
block.title, block.title.replace(" ", "-")
340+
)
336341
self.filename = filename
337342
self.image_number = parent_image_number
338343
else:

0 commit comments

Comments
 (0)