Skip to content

Commit

Permalink
fix(foldernote): fix not renaming using frontmatter
Browse files Browse the repository at this point in the history
I forgot an option...
  • Loading branch information
Mara-Li committed Jun 17, 2022
1 parent cc4adbd commit bb54447
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mkdocsPublisher/utils/filePathConvertor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit bb54447

Please sign in to comment.