starlight-obsidian 0.4.5 → 0.4.7
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/README.md +2 -6
- package/libs/obsidian.ts +7 -5
- package/libs/remark.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -15,17 +15,13 @@
|
|
|
15
15
|
|
|
16
16
|
## Getting Started
|
|
17
17
|
|
|
18
|
-
Want to get started immediately? Check out the [getting started guide](https://starlight-obsidian.vercel.app/getting-started/).
|
|
18
|
+
Want to get started immediately? Check out the [getting started guide](https://starlight-obsidian.vercel.app/getting-started/) or check out the [demo](https://starlight-obsidian.vercel.app/demo/hello/) to see the plugin in action.
|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
22
22
|
A [Starlight](https://starlight.astro.build) plugin to publish [Obsidian](https://obsidian.md) vaults to a Starlight website.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
> **Warning**
|
|
27
|
-
>
|
|
28
|
-
> The Starlight Obsidian plugin is in early development. If you find something that's not working, [open an issue](https://github.com/HiDeoo/starlight-obsidian/issues/new/choose) on GitHub.
|
|
24
|
+
> [!NOTE]
|
|
29
25
|
>
|
|
30
26
|
> You should also always check that the rendered pages are correct and only include the content you want to publish before publishing your website.
|
|
31
27
|
|
package/libs/obsidian.ts
CHANGED
|
@@ -23,16 +23,18 @@ const obsidianFrontmatterSchema = z.object({
|
|
|
23
23
|
aliases: z
|
|
24
24
|
.array(z.string())
|
|
25
25
|
.optional()
|
|
26
|
+
.nullable()
|
|
26
27
|
.transform((aliases) => aliases?.map((alias) => slug(alias))),
|
|
27
|
-
cover: z.string().optional(),
|
|
28
|
-
description: z.string().optional(),
|
|
29
|
-
image: z.string().optional(),
|
|
30
|
-
permalink: z.string().optional(),
|
|
28
|
+
cover: z.string().optional().nullable(),
|
|
29
|
+
description: z.string().optional().nullable(),
|
|
30
|
+
image: z.string().optional().nullable(),
|
|
31
|
+
permalink: z.string().optional().nullable(),
|
|
31
32
|
publish: z
|
|
32
33
|
.union([z.boolean(), z.literal('true'), z.literal('false')])
|
|
33
34
|
.optional()
|
|
35
|
+
.nullable()
|
|
34
36
|
.transform((publish) => publish === undefined || publish === 'true' || publish === true),
|
|
35
|
-
tags: z.array(z.string()).optional(),
|
|
37
|
+
tags: z.array(z.string()).optional().nullable(),
|
|
36
38
|
})
|
|
37
39
|
|
|
38
40
|
const imageFileFormats = new Set(['.avif', '.bmp', '.gif', '.jpeg', '.jpg', '.png', '.svg', '.webp'])
|
package/libs/remark.ts
CHANGED
|
@@ -497,7 +497,7 @@ function getFrontmatterNodeValue(file: VFile, obsidianFrontmatter?: ObsidianFron
|
|
|
497
497
|
frontmatter.tags = obsidianFrontmatter.tags
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
-
return yaml.stringify(frontmatter).trim()
|
|
500
|
+
return yaml.stringify(frontmatter, { version: '1.1' }).trim()
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
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.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Starlight plugin to publish Obsidian vaults.",
|
|
6
6
|
"author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"yaml": "2.3.4"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@astrojs/starlight": "0.
|
|
48
|
+
"@astrojs/starlight": "0.24.4",
|
|
49
49
|
"@types/hast": "3.0.3",
|
|
50
50
|
"@types/html-escaper": "3.0.2",
|
|
51
51
|
"@types/mdast": "4.0.3",
|
|
52
52
|
"@types/unist": "3.0.2",
|
|
53
|
-
"astro": "4.
|
|
53
|
+
"astro": "4.11.1",
|
|
54
54
|
"typescript": "5.3.3",
|
|
55
55
|
"vitest": "1.2.1"
|
|
56
56
|
},
|