Skip to content

Commit 6ac57b7

Browse files
committed
Migrate to Astro 5
1 parent ff6165d commit 6ac57b7

28 files changed

+1515
-2880
lines changed

docs/astro.config.mjs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import "prism-code-editor/prism/languages/vue"
1212
languages.selector = {
1313
selector: {
1414
pattern: /[^]+/,
15-
inside: languages.css.selector.inside
16-
}
15+
inside: languages.css.selector.inside,
16+
},
1717
}
1818

1919
/** @type {import("rehype-prism-code-editor").PcePluginOptions} */
@@ -25,7 +25,7 @@ const pluginOptions = {
2525
wordWrap: true,
2626
},
2727
defaultEditorProps: {
28-
overlays: [indentGuides]
28+
overlays: [indentGuides],
2929
},
3030
customRenderer(props, defaultRenderer) {
3131
const file = props.file
@@ -51,9 +51,13 @@ export default defineConfig({
5151
ThemeProvider: "./src/components/ThemeProvider.astro",
5252
MobileMenuFooter: "./src/components/MobileMenuFooter.astro",
5353
},
54-
social: {
55-
github: "https://github.com/fiamecaster/prism-code-editor",
56-
},
54+
social: [
55+
{
56+
icon: "github",
57+
label: "GitHub",
58+
href: "https://github.com/fiamecaster/prism-code-editor",
59+
},
60+
],
5761
plugins: [
5862
// Generate the documentation.
5963
starlightTypeDoc({

docs/package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,22 @@
66
"scripts": {
77
"dev": "astro dev",
88
"start": "astro dev",
9-
"build": "astro check && astro build",
9+
"build": "astro build",
1010
"preview": "astro preview",
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"@astrojs/check": "^0.9.3",
15-
"@astrojs/starlight": "^0.26.1",
16-
"astro": "^4.16.18",
14+
"@astrojs/starlight": "^0.34.3",
15+
"astro": "^5.7.12",
1716
"prism-code-editor": "4.0.0-beta.1",
1817
"rehype-prism-code-editor": "^0.1.0",
1918
"sharp": "^0.32.6",
20-
"starlight-typedoc": "^0.16.0",
21-
"typedoc": "^0.26.11",
22-
"typedoc-plugin-markdown": "^4.2.10",
23-
"typescript": "^5.8.2"
19+
"starlight-typedoc": "^0.21.3"
2420
},
25-
"packageManager": "pnpm@9.0.4+sha1.b198ac6d38244fd829253720f9daafd6a606834d",
21+
"packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee",
2622
"pnpm": {
2723
"patchedDependencies": {
28-
"starlight-typedoc@0.16.0": "patches/starlight-typedoc@0.16.0.patch"
24+
"starlight-typedoc": "patches/starlight-typedoc.patch"
2925
}
3026
}
3127
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/libs/typedoc.ts b/libs/typedoc.ts
2-
index 9030cc81c2ff022ad3e9e507d8397fd8a02e6034..e10d661b8c02fb177ff089b64ad11b31d90ca20d 100644
2+
index aac6cd1dae63e7b5bc1fda564ac36b4d75e52901..d4f0663747dd69ae007a908b12e8d7598f9abcab 100644
33
--- a/libs/typedoc.ts
44
+++ b/libs/typedoc.ts
5-
@@ -140,6 +140,17 @@ function onRendererPageEnd(event: MarkdownPageEvent, pagination: boolean) {
5+
@@ -161,6 +161,17 @@ function onRendererPageEnd(event: MarkdownPageEvent, outputDirectory: string, pa
66
return true
77
}
88

@@ -18,13 +18,13 @@ index 9030cc81c2ff022ad3e9e507d8397fd8a02e6034..e10d661b8c02fb177ff089b64ad11b31
1818
+ .replace(/(?:\.\.\/)+/g, "/")
1919
+
2020
if (!event.frontmatter) {
21-
event.contents = addFrontmatter(event.contents, {
22-
editUrl: false,
23-
@@ -147,6 +158,7 @@ function onRendererPageEnd(event: MarkdownPageEvent, pagination: boolean) {
24-
prev: pagination,
25-
// Wrap in quotes to prevent issue with special characters in frontmatter
26-
title: `"${event.model.name}"`,
27-
+ sidebar: `\n order: ${(/[/\\][^/\\]+[/\\]/.test(newURL) ? 0 : 2) + +!isFuncVar}${match ? `\n label: ${match[3]}` : ""}`
28-
})
21+
event.contents = addFrontmatter(
22+
event.contents,
23+
@@ -170,6 +181,7 @@ function onRendererPageEnd(event: MarkdownPageEvent, outputDirectory: string, pa
24+
prev: pagination,
25+
// Wrap in quotes to prevent issue with special characters in frontmatter
26+
title: `"${event.model.name}"`,
27+
+ sidebar: `\n order: ${(/[/\\][^/\\]+[/\\]/.test(newURL) ? 0 : 2) + +!isFuncVar}${match ? `\n label: ${match[3]}` : ""}`,
28+
}),
29+
)
2930
}
30-

0 commit comments

Comments
 (0)