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.
- package/libs/remark.ts +4 -1
- 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
|
-
|
|
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) {
|