From bb54447abf1801c1623e444ea651e49ef0e5a49c Mon Sep 17 00:00:00 2001 From: Mara Date: Fri, 17 Jun 2022 23:15:11 +0200 Subject: [PATCH] fix(foldernote): fix not renaming using frontmatter I forgot an option... --- mkdocsPublisher/utils/filePathConvertor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkdocsPublisher/utils/filePathConvertor.ts b/mkdocsPublisher/utils/filePathConvertor.ts index d4b24e7b..9a003edc 100644 --- a/mkdocsPublisher/utils/filePathConvertor.ts +++ b/mkdocsPublisher/utils/filePathConvertor.ts @@ -32,7 +32,8 @@ function getReceiptFolder(file: TFile, settings:MkdocsPublicationSettings, metad if (frontmatter && frontmatter[settings.yamlFolderKey]) { const category = frontmatter[settings.yamlFolderKey] const parentCatFolder = !category.endsWith('/') ? category.split('/').at(-1): category.split('/').at(-2); - const fileName = settings.folderNote && parentCatFolder === file.name ? 'index.md' : file.name + const fileName = settings.folderNote && parentCatFolder === file.name.replace('.md', '') ? 'index.md' : file.name + console.log(file.name, parentCatFolder, fileName); path = folderRoot + frontmatter[settings.yamlFolderKey] + "/" + fileName; } } else if (settings.downloadedFolder === "obsidianPath") {