starlight-obsidian 0.4.8 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/libs/remark.ts +4 -1
  2. package/package.json +1 -1
package/libs/remark.ts CHANGED
@@ -497,7 +497,10 @@ function getFrontmatterNodeValue(file: VFile, obsidianFrontmatter?: ObsidianFron
497
497
  frontmatter.tags = obsidianFrontmatter.tags
498
498
  }
499
499
 
500
- return yaml.stringify(frontmatter, { version: '1.1' }).trim()
500
+ const { title, ...frontmatterWithoutTitle } = frontmatter
501
+
502
+ // The title should always be a string (even if it looks like a date).
503
+ return (yaml.stringify({ title }, { version: '1.1' }) + yaml.stringify(frontmatterWithoutTitle)).trim()
501
504
  }
502
505
 
503
506
  function getFileUrl(output: StarlightObsidianConfig['output'], filePath: string, anchor?: string) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-obsidian",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "license": "MIT",
5
5
  "description": "Starlight plugin to publish Obsidian vaults.",
6
6
  "author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)",