starlight-obsidian 0.4.7 → 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/index.ts +1 -0
- package/libs/remark.ts +4 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -124,6 +124,7 @@ export default function starlightObsidianPlugin(userConfig: StarlightObsidianUse
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
const updatedStarlightConfig: Partial<StarlightUserConfig> = {
|
|
127
|
+
components: starlightConfig.components,
|
|
127
128
|
customCss,
|
|
128
129
|
sidebar: getSidebarFromConfig(config, starlightConfig.sidebar),
|
|
129
130
|
}
|
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) {
|