mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-30 00:48:36 +08:00
fix: cannot parse title from front matter
This commit is contained in:
@@ -35,7 +35,10 @@ export async function getNowFileMarkdownContentCustom(
|
||||
|
||||
// If a 'title' type property exists, use the file's basename as its value
|
||||
if (titleProperty) {
|
||||
customValues[titleProperty.customName] = nowFile.basename; // Use 'basename' for the file name without extension
|
||||
customValues[titleProperty.customName] =
|
||||
(FileCache.frontmatter && FileCache.frontmatter[titleProperty.customName]) ?
|
||||
FileCache.frontmatter[titleProperty.customName] : // use the front matter value if it exists
|
||||
nowFile.basename; // Use 'basename' for the file name without extension
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user