@ruan-cat/vitepress-preset-config 0.3.0 → 0.5.0
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/dist/config.mjs +4 -2
- package/dist/theme.css +7 -0
- package/dist/theme.mjs +1 -6
- package/package.json +4 -3
- package/src/.vitepress/theme/index.ts +1 -0
- package/src/config.mts +3 -1
- package/src/index.css +5 -0
- package/src/theme.ts +9 -6
package/dist/config.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { defineConfig } from "vitepress";
|
|
3
3
|
import { generateSidebar } from "vitepress-sidebar";
|
|
4
4
|
import { GitChangelog, GitChangelogMarkdownSection } from "@nolebase/vitepress-plugin-git-changelog/vite";
|
|
5
|
-
import { vitepressDemoPlugin } from "vitepress-demo-plugin";
|
|
5
|
+
import { vitepressDemoPlugin } from "@ruan-cat/vitepress-demo-plugin";
|
|
6
6
|
import { merge, isUndefined, cloneDeep } from "lodash-es";
|
|
7
7
|
import consola from "consola";
|
|
8
8
|
import { addChangelog2doc, hasChangelogMd } from "@ruan-cat/utils/node-esm";
|
|
@@ -71,7 +71,9 @@ var defaultUserConfig = {
|
|
|
71
71
|
// @ts-ignore
|
|
72
72
|
GitChangelog({
|
|
73
73
|
// 填写在此处填写您的仓库链接
|
|
74
|
-
repoURL: () => "https://github.com/ruan-cat/vercel-monorepo-test"
|
|
74
|
+
repoURL: () => "https://github.com/ruan-cat/vercel-monorepo-test",
|
|
75
|
+
// 最大日志深度为10, 避免获取过多无意义的历史日志
|
|
76
|
+
maxGitLogCount: 10
|
|
75
77
|
}),
|
|
76
78
|
// @ts-ignore
|
|
77
79
|
GitChangelogMarkdownSection()
|
package/dist/theme.css
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
@import "@ruan-cat/vitepress-demo-plugin/dist/index.css";
|
|
2
|
+
@import "@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css";
|
|
3
|
+
@import "@nolebase/vitepress-plugin-highlight-targeted-heading/client/style.css";
|
|
4
|
+
@import "@nolebase/vitepress-plugin-git-changelog/client/style.css";
|
|
5
|
+
@import "@shikijs/vitepress-twoslash/style.css";
|
|
6
|
+
|
|
7
|
+
/* src/index.css */
|
package/dist/theme.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// src/theme.ts
|
|
2
2
|
import { h } from "vue";
|
|
3
3
|
import DefaultTheme from "vitepress/theme";
|
|
4
|
-
import { VitepressDemoBox, VitepressDemoPlaceholder } from "vitepress-demo-plugin";
|
|
5
|
-
import "vitepress-demo-plugin/dist/index.css";
|
|
4
|
+
import { VitepressDemoBox, VitepressDemoPlaceholder } from "@ruan-cat/vitepress-demo-plugin";
|
|
6
5
|
import { NolebaseBreadcrumbs } from "@nolebase/vitepress-plugin-breadcrumbs/client";
|
|
7
6
|
import {
|
|
8
7
|
NolebaseEnhancedReadabilitiesMenu,
|
|
@@ -10,13 +9,9 @@ import {
|
|
|
10
9
|
InjectionKey,
|
|
11
10
|
LayoutMode
|
|
12
11
|
} from "@nolebase/vitepress-plugin-enhanced-readabilities/client";
|
|
13
|
-
import "@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css";
|
|
14
12
|
import { NolebaseHighlightTargetedHeading } from "@nolebase/vitepress-plugin-highlight-targeted-heading/client";
|
|
15
|
-
import "@nolebase/vitepress-plugin-highlight-targeted-heading/client/style.css";
|
|
16
13
|
import { NolebaseGitChangelogPlugin } from "@nolebase/vitepress-plugin-git-changelog/client";
|
|
17
|
-
import "@nolebase/vitepress-plugin-git-changelog/client/style.css";
|
|
18
14
|
import TwoslashFloatingVue from "@shikijs/vitepress-twoslash/client";
|
|
19
|
-
import "@shikijs/vitepress-twoslash/style.css";
|
|
20
15
|
function defineRuancatPresetTheme(params) {
|
|
21
16
|
return {
|
|
22
17
|
extends: DefaultTheme,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruan-cat/vitepress-preset-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "用于给大多数的vitepress项目提供一个预设的配置文件。",
|
|
5
5
|
"homepage": "https://vitepress-preset.ruancat6312.top",
|
|
6
6
|
"types": "./src/config.mts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"vitepress-sidebar": "^1.31.1",
|
|
18
18
|
"vue": "^3.5.13",
|
|
19
19
|
"@ruan-cat/utils": "^4.2.1",
|
|
20
|
-
"vitepress-demo-plugin": "^1.
|
|
20
|
+
"@ruan-cat/vitepress-demo-plugin": "^0.1.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
"./theme": {
|
|
49
49
|
"import": "./dist/theme.mjs",
|
|
50
50
|
"types": "./src/theme.ts"
|
|
51
|
-
}
|
|
51
|
+
},
|
|
52
|
+
"./theme.css": "./dist/theme.css"
|
|
52
53
|
},
|
|
53
54
|
"keywords": [
|
|
54
55
|
"vitepress"
|
package/src/config.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { generateSidebar, withSidebar } from "vitepress-sidebar";
|
|
|
4
4
|
export { defineConfig };
|
|
5
5
|
|
|
6
6
|
import { GitChangelog, GitChangelogMarkdownSection } from "@nolebase/vitepress-plugin-git-changelog/vite";
|
|
7
|
-
import { vitepressDemoPlugin } from "vitepress-demo-plugin";
|
|
7
|
+
import { vitepressDemoPlugin } from "@ruan-cat/vitepress-demo-plugin";
|
|
8
8
|
|
|
9
9
|
import { merge, isUndefined, cloneDeep } from "lodash-es";
|
|
10
10
|
import consola from "consola";
|
|
@@ -111,6 +111,8 @@ const defaultUserConfig: UserConfig<DefaultTheme.Config> = {
|
|
|
111
111
|
GitChangelog({
|
|
112
112
|
// 填写在此处填写您的仓库链接
|
|
113
113
|
repoURL: () => "https://github.com/ruan-cat/vercel-monorepo-test",
|
|
114
|
+
// 最大日志深度为10, 避免获取过多无意义的历史日志
|
|
115
|
+
maxGitLogCount: 10,
|
|
114
116
|
}),
|
|
115
117
|
// @ts-ignore
|
|
116
118
|
GitChangelogMarkdownSection(),
|
package/src/index.css
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
@import "@ruan-cat/vitepress-demo-plugin/dist/index.css";
|
|
2
|
+
@import "@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css";
|
|
3
|
+
@import "@nolebase/vitepress-plugin-highlight-targeted-heading/client/style.css";
|
|
4
|
+
@import "@nolebase/vitepress-plugin-git-changelog/client/style.css";
|
|
5
|
+
@import "@shikijs/vitepress-twoslash/style.css";
|
package/src/theme.ts
CHANGED
|
@@ -3,8 +3,11 @@ import { h } from "vue";
|
|
|
3
3
|
import type { Theme, EnhanceAppContext } from "vitepress";
|
|
4
4
|
import DefaultTheme from "vitepress/theme";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
import "
|
|
6
|
+
// 将全部的样式集中在专门的文件内 在tsup内被打包出去
|
|
7
|
+
import "./index.css";
|
|
8
|
+
|
|
9
|
+
import { VitepressDemoBox, VitepressDemoPlaceholder } from "@ruan-cat/vitepress-demo-plugin";
|
|
10
|
+
// import "@ruan-cat/vitepress-demo-plugin/dist/index.css";
|
|
8
11
|
|
|
9
12
|
import { NolebaseBreadcrumbs } from "@nolebase/vitepress-plugin-breadcrumbs/client";
|
|
10
13
|
|
|
@@ -17,16 +20,16 @@ import {
|
|
|
17
20
|
type Options,
|
|
18
21
|
LayoutMode,
|
|
19
22
|
} from "@nolebase/vitepress-plugin-enhanced-readabilities/client";
|
|
20
|
-
import "@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css";
|
|
23
|
+
// import "@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css";
|
|
21
24
|
|
|
22
25
|
import { NolebaseHighlightTargetedHeading } from "@nolebase/vitepress-plugin-highlight-targeted-heading/client";
|
|
23
|
-
import "@nolebase/vitepress-plugin-highlight-targeted-heading/client/style.css";
|
|
26
|
+
// import "@nolebase/vitepress-plugin-highlight-targeted-heading/client/style.css";
|
|
24
27
|
|
|
25
28
|
import { NolebaseGitChangelogPlugin } from "@nolebase/vitepress-plugin-git-changelog/client";
|
|
26
|
-
import "@nolebase/vitepress-plugin-git-changelog/client/style.css";
|
|
29
|
+
// import "@nolebase/vitepress-plugin-git-changelog/client/style.css";
|
|
27
30
|
|
|
28
31
|
import TwoslashFloatingVue from "@shikijs/vitepress-twoslash/client";
|
|
29
|
-
import "@shikijs/vitepress-twoslash/style.css";
|
|
32
|
+
// import "@shikijs/vitepress-twoslash/style.css";
|
|
30
33
|
|
|
31
34
|
/** 一个回调函数 用来暴露变量 实现注册 */
|
|
32
35
|
export interface EnhanceAppCallBack {
|