Skip to content

Commit ea42aea

Browse files
committed
fix(outDir 重复)
1 parent 4b0f91b commit ea42aea

File tree

3 files changed

+10
-164
lines changed

3 files changed

+10
-164
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
node_modules
88
dist/
99
doc_build/
10+
doc_build_fun/
1011

1112
# IDE
1213
.vscode/*

rspress.config.fun.ts

Lines changed: 4 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -1,164 +1,7 @@
1-
import { pluginRss } from "@rspress/plugin-rss";
21
import { defineConfig } from "rspress/config";
2+
import { config } from "./rspress.config";
33

4-
const siteUrl = "https://scriptingapp.github.io";
4+
config.base = "/doc_v2/";
5+
config.outDir = "doc_build_fun";
56

6-
export default defineConfig({
7-
// root: path.join(__dirname, "docs"),
8-
// outDir: "public",
9-
base: "/doc_v2/",
10-
title: "Scripting",
11-
icon: "/icon.png",
12-
logo: "/logo.png",
13-
logoText: "Scripting",
14-
route: {
15-
cleanUrls: true,
16-
extensions: [".md", ".mdx"],
17-
},
18-
search: {
19-
codeBlocks: true,
20-
},
21-
markdown: {
22-
showLineNumbers: true,
23-
defaultWrapCode: false,
24-
},
25-
plugins: [
26-
pluginRss({
27-
siteUrl: siteUrl,
28-
feed: [
29-
{
30-
id: "changelog",
31-
test: "/guide/changelog/",
32-
title: "Scripting Changelog",
33-
language: "en-US",
34-
},
35-
{
36-
id: "changelog_zh",
37-
test: "/zh/guide/changelog/",
38-
title: "Scripting 更新日志",
39-
language: "zh-CN",
40-
},
41-
],
42-
output: {
43-
dir: "feeds",
44-
type: "rss",
45-
},
46-
}),
47-
],
48-
themeConfig: {
49-
// enableScrollToTop: true,
50-
// hideNavbar: "auto",
51-
// lastUpdated: true, // 是否显示最后更新时间
52-
locales: [
53-
{
54-
lang: "en",
55-
label: "English",
56-
lastUpdatedText: "Last Updated",
57-
outlineTitle: "Outline",
58-
prevPageText: "Previous Page",
59-
nextPageText: "Next Page",
60-
searchPlaceholderText: "Search",
61-
searchNoResultsText: "No results for",
62-
searchSuggestedQueryText: "Please try again with a different keyword",
63-
overview: {
64-
filterNameText: "Filter",
65-
filterPlaceholderText: "Enter keyword",
66-
filterNoResultText: "No matching API found",
67-
},
68-
},
69-
{
70-
lang: "zh",
71-
label: "简体中文",
72-
lastUpdatedText: "最后更新",
73-
outlineTitle: "大纲",
74-
prevPageText: "上一页",
75-
nextPageText: "下一页",
76-
searchPlaceholderText: "搜索",
77-
searchNoResultsText: "没有搜索结果",
78-
searchSuggestedQueryText: "请尝试使用不同的关键词",
79-
overview: {
80-
filterNameText: "筛选",
81-
filterPlaceholderText: "输入关键词",
82-
filterNoResultText: "没有找到匹配的 API",
83-
},
84-
},
85-
],
86-
socialLinks: [
87-
{
88-
icon: "github",
89-
mode: "link",
90-
content: "https://github.com/ScriptingApp",
91-
},
92-
{
93-
icon: "X",
94-
mode: "link",
95-
content: "https://x.com/thomfang",
96-
},
97-
{
98-
icon: {
99-
svg: `
100-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="32 32 512 512" width="32" height="32" fill="currentColor">
101-
<mask id="mask-logo">
102-
<rect width="100%" height="100%" fill="white"/>
103-
<rect x="220" y="340" width="275" height="190" rx="50" ry="50" fill="black"/>
104-
</mask>
105-
<mask id="mask-text">
106-
<rect x="245" y="360" width="225" height="150" rx="40" ry="40" fill="white"/>
107-
<text x="357" y="480" font-size="120" font-weight="bold" text-anchor="middle" fill="black">EN</text>
108-
</mask>
109-
<path d="M128 416c0 17.7-14.3 32-32 32s-32-14.3-32-32
110-
14.3-32 32-32 32 14.3 32 32zm144 32c0-107.5-84.5-192-192-192v64
111-
c70.7 0 128 57.3 128 128h64zm96 0c0-159.1-128.9-288-288-288v64
112-
c123.7 0 224 100.3 224 224h64z"
113-
mask="url(#mask-logo)"/>
114-
<rect x="240" y="363" width="235" height="150" rx="40" ry="40"
115-
mask="url(#mask-text)"/>
116-
</svg>
117-
`,
118-
},
119-
mode: "link",
120-
content: "https://scriptingapp.github.io/feeds/changelog.rss",
121-
},
122-
{
123-
icon: {
124-
svg: `
125-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="32 32 512 512" width="32" height="32" fill="currentColor">
126-
<mask id="mask-logo">
127-
<rect width="100%" height="100%" fill="white"/>
128-
<rect x="220" y="340" width="275" height="190" rx="50" ry="50" fill="black"/>
129-
</mask>
130-
<mask id="mask-text">
131-
<rect x="245" y="360" width="225" height="150" rx="40" ry="40" fill="white"/>
132-
<text x="357" y="480" font-size="120" font-weight="bold" text-anchor="middle" fill="black">ZH</text>
133-
</mask>
134-
<path d="M128 416c0 17.7-14.3 32-32 32s-32-14.3-32-32
135-
14.3-32 32-32 32 14.3 32 32zm144 32c0-107.5-84.5-192-192-192v64
136-
c70.7 0 128 57.3 128 128h64zm96 0c0-159.1-128.9-288-288-288v64
137-
c123.7 0 224 100.3 224 224h64z"
138-
mask="url(#mask-logo)"/>
139-
<rect x="240" y="363" width="235" height="150" rx="40" ry="40"
140-
mask="url(#mask-text)"/>
141-
</svg>
142-
`,
143-
},
144-
mode: "link",
145-
content: "https://scriptingapp.github.io/feeds/changelog_zh.rss",
146-
},
147-
],
148-
},
149-
lang: "en",
150-
locales: [
151-
{
152-
lang: "en",
153-
label: "English",
154-
title: "Rspress",
155-
description: "Static Site Generator",
156-
},
157-
{
158-
lang: "zh",
159-
label: "简体中文",
160-
title: "Rspress",
161-
description: "静态网站生成器",
162-
},
163-
],
164-
});
7+
export default defineConfig(config);

rspress.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { pluginRss } from "@rspress/plugin-rss";
2-
import { defineConfig } from "rspress/config";
2+
import { defineConfig, UserConfig } from "rspress/config";
33

44
const siteUrl = "https://scriptingapp.github.io";
55

6-
export default defineConfig({
6+
export const config: UserConfig = {
77
// root: path.join(__dirname, "docs"),
88
// outDir: "public",
99
title: "Scripting",
@@ -160,4 +160,6 @@ export default defineConfig({
160160
description: "静态网站生成器",
161161
},
162162
],
163-
});
163+
};
164+
165+
export default defineConfig(config);

0 commit comments

Comments
 (0)