Skip to content

Commit 2085d60

Browse files
committed
docs: update vuepress site
- update to vuepress beta v48
1 parent e32f3a1 commit 2085d60

File tree

5 files changed

+28730
-29647
lines changed

5 files changed

+28730
-29647
lines changed

docs/.vuepress/client.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineClientConfig } from "@vuepress/client";
2+
3+
export default defineClientConfig({
4+
enhance({ app, router, siteData }) {},
5+
setup() {},
6+
rootComponents: [],
7+
});

docs/.vuepress/config.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { defineUserConfig } from "vuepress";
2-
import { path } from "@vuepress/utils";
3-
import type { DefaultThemeOptions } from "vuepress";
2+
import localTheme from "./theme/index";
3+
import { searchPlugin } from "@vuepress/plugin-search";
44

5-
export default defineUserConfig<DefaultThemeOptions>({
5+
export default defineUserConfig({
66
lang: "en-US",
77
title: "PurgeCSS",
88
description: "PurgeCSS is a tool to remove unused CSS from your project",
@@ -81,8 +81,7 @@ export default defineUserConfig<DefaultThemeOptions>({
8181
`,
8282
],
8383
],
84-
theme: path.resolve(__dirname, "./theme/index.ts"),
85-
themeConfig: {
84+
theme: localTheme({
8685
logo: "https://i.imgur.com/UEiUiJ0.png",
8786
repo: "FullHuman/purgecss",
8887
navbar: [
@@ -203,6 +202,6 @@ export default defineUserConfig<DefaultThemeOptions>({
203202
},
204203
],
205204
},
206-
},
207-
plugins: ["@vuepress/plugin-search"],
205+
}),
206+
plugins: [searchPlugin()],
208207
});

docs/.vuepress/theme/index.ts

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
import type { ThemeObject } from "@vuepress/core";
22
import { path } from "@vuepress/utils";
3+
import { ThemeFunction, defaultTheme, DefaultThemeOptions } from "vuepress";
34

4-
const localTheme: ThemeObject = {
5-
name: "vuepress-theme-local",
6-
extends: "@vuepress/theme-default",
7-
layouts: {
8-
Layout: path.resolve(__dirname, "layouts/Layout.vue"),
9-
},
10-
alias: {
11-
"@theme/CarbonAds.vue": path.resolve(__dirname, "components/CarbonAds.vue"),
12-
},
5+
const localTheme = (themeOptions: DefaultThemeOptions) => {
6+
return {
7+
name: "vuepress-theme-local",
8+
extends: defaultTheme(themeOptions),
9+
layouts: {
10+
Layout: path.resolve(__dirname, "layouts/Layout.vue"),
11+
},
12+
alias: {
13+
"@theme/CarbonAds.vue": path.resolve(
14+
__dirname,
15+
"components/CarbonAds.vue"
16+
),
17+
},
18+
};
1319
};
1420

1521
export default localTheme;

0 commit comments

Comments
 (0)