@voidzero-dev/vitepress-theme 3.0.1 → 3.0.2
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/config.d.ts +1 -0
- package/{config.ts → config.js} +5 -6
- package/package.json +3 -2
package/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function extendConfig<T>(c: T): T
|
package/{config.ts → config.js}
RENAMED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { UserConfig } from "vitepress";
|
|
2
1
|
import { resolve } from "path";
|
|
3
2
|
import tailwindcss from "@tailwindcss/vite";
|
|
4
|
-
import type { VoidZeroThemeConfig } from "./src";
|
|
5
3
|
|
|
6
4
|
const __dirname = import.meta.dirname;
|
|
7
5
|
|
|
@@ -14,14 +12,15 @@ const aliases = {
|
|
|
14
12
|
"src/composables/vitepress-default"
|
|
15
13
|
),
|
|
16
14
|
"@vp-support": resolve(__dirname, "src/support/vitepress-default"),
|
|
15
|
+
"@rive-app/canvas": import.meta.resolve("@rive-app/canvas")
|
|
17
16
|
};
|
|
18
17
|
|
|
19
|
-
export function extendConfig
|
|
20
|
-
const config = c
|
|
18
|
+
export function extendConfig(c) {
|
|
19
|
+
const config = c;
|
|
21
20
|
|
|
22
21
|
// inject banner dismissal inline script in head
|
|
23
22
|
// so that the dismissed class is added before CSS is loaded
|
|
24
|
-
const bannerId =
|
|
23
|
+
const bannerId = config.themeConfig.banner?.id;
|
|
25
24
|
if (bannerId) {
|
|
26
25
|
config.head ??= [];
|
|
27
26
|
config.head.unshift([
|
|
@@ -50,7 +49,7 @@ export function extendConfig<T>(c: T): T {
|
|
|
50
49
|
|
|
51
50
|
// inject tailwind plugin
|
|
52
51
|
v.plugins ??= [];
|
|
53
|
-
v.plugins.unshift(tailwindcss()
|
|
52
|
+
v.plugins.unshift(tailwindcss());
|
|
54
53
|
|
|
55
54
|
// inject alias
|
|
56
55
|
v.resolve ??= {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voidzero-dev/vitepress-theme",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Shared VitePress theme for VoidZero projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"module": "./src/index.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"src",
|
|
11
|
-
"config.
|
|
11
|
+
"config.js",
|
|
12
|
+
"config.d.ts"
|
|
12
13
|
],
|
|
13
14
|
"sideEffects": [
|
|
14
15
|
"*.css"
|