mirror of
https://github.com/woodchen-ink/obsidian-publish-to-discourse.git
synced 2025-07-18 05:42:05 +08:00
Use frontmatter title as post title when available
- Modify post title generation to prefer frontmatter title - Fallback to filename if no frontmatter title is present
This commit is contained in:
parent
8f31ae8f96
commit
898496007f
@ -154,7 +154,7 @@ export default class DiscourseSyncPlugin extends Plugin {
|
||||
edit_reason: "Updated from Obsidian",
|
||||
tags: this.settings.selectedTags || []
|
||||
} : {
|
||||
title: this.activeFile.name,
|
||||
title: (frontMatter?.title ? frontMatter?.title : this.activeFile.name),
|
||||
raw: content,
|
||||
category: this.settings.category,
|
||||
tags: this.settings.selectedTags || []
|
||||
|
Loading…
x
Reference in New Issue
Block a user