diff --git a/main.js b/main.js index a6cdd92..2a7a8ad 100644 --- a/main.js +++ b/main.js @@ -173,19 +173,21 @@ class AstroPostExporter extends Plugin { const modified = file.stat && file.stat.mtime ? file.stat.mtime : Date.now(); const title = file.basename; - const includePubDate = !hasFrontmatterKey(content, "pubDate"); + const includeDescription = !hasFrontmatterKey(content, "description"); const pubDate = moment(created).format(this.settings.dateFormat); const modifiedDate = moment(modified).format(this.settings.dateFormat); const frontmatterLines = [ `title: "${escapeYamlString(title)}"`, - ...(includePubDate ? [`pubDate: "${pubDate}"`] : []), - `${this.settings.modifiedDateKey}: "${modifiedDate}"` + ...(includeDescription ? [`description: "${escapeYamlString(title)}"`] : []), + `pubDate: ${pubDate}`, + `${this.settings.modifiedDateKey}: ${modifiedDate}` ]; const keysToReplace = [ "title", - ...(includePubDate ? ["pubDate"] : []), + ...(includeDescription ? ["description"] : []), + "pubDate", this.settings.modifiedDateKey ]; return upsertFrontmatter(content, frontmatterLines, keysToReplace); diff --git a/manifest.json b/manifest.json index cb484b9..2888c3d 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ { "id": "astro-post-exporter", "name": "Astro Post Exporter", - "version": "0.1.0", + "version": "0.1.1", "minAppVersion": "1.4.0", "description": "Export Obsidian notes to an Astro posts folder with frontmatter.", - "author": "astro-chiri", + "author": "Logic", "isDesktopOnly": true }