create-vuepress-theme-hope 2.0.0-beta.21 → 2.0.0-beta.210
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/LICENSE +1 -1
- package/README.md +35 -0
- package/lib/index.js +65 -0
- package/package.json +25 -14
- package/template/blog/.vuepress/config.ts +24 -0
- package/template/blog/.vuepress/navbar/en.ts +52 -0
- package/template/blog/.vuepress/navbar/index.ts +2 -0
- package/template/blog/.vuepress/navbar/zh.ts +52 -0
- package/template/blog/.vuepress/public/assets/images/cover1.jpg +0 -0
- package/template/blog/.vuepress/public/assets/images/cover2.jpg +0 -0
- package/template/blog/.vuepress/public/assets/images/cover3.jpg +0 -0
- package/template/blog/.vuepress/sidebar/en.ts +22 -0
- package/template/blog/.vuepress/sidebar/index.ts +2 -0
- package/template/blog/.vuepress/sidebar/zh.ts +22 -0
- package/template/blog/.vuepress/styles/config.scss +3 -0
- package/template/blog/.vuepress/styles/index.scss +1 -0
- package/template/blog/.vuepress/styles/palette.scss +2 -0
- package/template/blog/.vuepress/theme.ts +224 -0
- package/template/{i18n → blog}/README.md +5 -5
- package/template/{i18n/guide → blog/demo}/README.md +5 -4
- package/template/{i18n/guide → blog/demo}/disable.md +4 -4
- package/template/{i18n/guide → blog/demo}/encrypt.md +1 -1
- package/template/blog/demo/markdown.md +423 -0
- package/template/blog/demo/page.md +74 -0
- package/template/blog/intro.md +8 -0
- package/template/{i18n/posts/article/article1.md → blog/posts/apple/1.md} +5 -4
- package/template/{en-US/posts/article/article2.md → blog/posts/apple/2.md} +9 -4
- package/template/{i18n/posts/article/article3.md → blog/posts/apple/3.md} +6 -5
- package/template/{i18n/posts/article/article4.md → blog/posts/apple/4.md} +6 -5
- package/template/{en-US/posts/article/article5.md → blog/posts/banana/1.md} +6 -5
- package/template/{en-US/posts/article/article6.md → blog/posts/banana/2.md} +10 -5
- package/template/{i18n/posts/article/article7.md → blog/posts/banana/3.md} +5 -5
- package/template/{i18n/posts/article/article8.md → blog/posts/banana/4.md} +5 -5
- package/template/{i18n/posts/article9.md → blog/posts/cherry.md} +5 -5
- package/template/{i18n/posts/article10.md → blog/posts/dragonfruit.md} +5 -5
- package/template/{i18n/posts/article11.md → blog/posts/strawberry.md} +5 -5
- package/template/{en-US/posts/article12.md → blog/posts/tomato.md} +6 -5
- package/template/{i18n/slide.md → blog/slides.md} +8 -8
- package/template/{i18n → blog}/zh/README.md +4 -4
- package/template/{i18n/zh/guide → blog/zh/demo}/README.md +5 -4
- package/template/{i18n/zh/guide → blog/zh/demo}/disable.md +4 -4
- package/template/blog/zh/demo/markdown.md +403 -0
- package/template/blog/zh/demo/page.md +74 -0
- package/template/blog/zh/intro.md +8 -0
- package/template/{i18n/zh/posts/article/article1.md → blog/zh/posts/apple/1.md} +5 -4
- package/template/{zh-CN/posts/article/article2.md → blog/zh/posts/apple/2.md} +9 -4
- package/template/{i18n/zh/posts/article/article3.md → blog/zh/posts/apple/3.md} +6 -5
- package/template/{zh-CN/posts/article/article4.md → blog/zh/posts/apple/4.md} +6 -5
- package/template/{i18n/zh/posts/article/article5.md → blog/zh/posts/banana/1.md} +6 -5
- package/template/{i18n/zh/posts/article/article6.md → blog/zh/posts/banana/2.md} +10 -5
- package/template/{i18n/zh/posts/article/article7.md → blog/zh/posts/banana/3.md} +5 -5
- package/template/{i18n/zh/posts/article/article8.md → blog/zh/posts/banana/4.md} +5 -5
- package/template/{i18n/zh/posts/article9.md → blog/zh/posts/cherry.md} +5 -5
- package/template/{i18n/zh/posts/article10.md → blog/zh/posts/dragonfruit.md} +5 -5
- package/template/{i18n/zh/posts/article11.md → blog/zh/posts/strawberry.md} +5 -5
- package/template/{i18n/zh/posts/article12.md → blog/zh/posts/tomato.md} +6 -5
- package/template/{i18n/zh/slide.md → blog/zh/slides.md} +1 -1
- package/template/docs/.vuepress/config.ts +24 -0
- package/template/docs/.vuepress/navbar/en.ts +30 -0
- package/template/docs/.vuepress/navbar/index.ts +2 -0
- package/template/docs/.vuepress/navbar/zh.ts +30 -0
- package/template/docs/.vuepress/sidebar/en.ts +21 -0
- package/template/docs/.vuepress/sidebar/index.ts +2 -0
- package/template/docs/.vuepress/sidebar/zh.ts +21 -0
- package/template/docs/.vuepress/styles/config.scss +3 -0
- package/template/docs/.vuepress/styles/index.scss +1 -0
- package/template/docs/.vuepress/styles/palette.scss +2 -0
- package/template/docs/.vuepress/theme.ts +172 -0
- package/template/{en-US/home.md → docs/README.md} +28 -28
- package/template/{en-US/guide → docs/demo}/README.md +5 -4
- package/template/{en-US/guide → docs/demo}/disable.md +4 -4
- package/template/{en-US/guide → docs/demo}/encrypt.md +1 -1
- package/template/docs/demo/markdown.md +423 -0
- package/template/docs/demo/page.md +72 -0
- package/template/docs/guide/README.md +16 -0
- package/template/docs/guide/bar/README.md +13 -0
- package/template/docs/guide/bar/baz.md +6 -0
- package/template/docs/guide/foo/README.md +13 -0
- package/template/docs/guide/foo/ray.md +6 -0
- package/template/{en-US/slide.md → docs/slides.md} +8 -8
- package/template/{i18n/zh/home.md → docs/zh/README.md} +24 -24
- package/template/{zh-CN/guide → docs/zh/demo}/README.md +5 -4
- package/template/{zh-CN/guide → docs/zh/demo}/disable.md +4 -4
- package/template/docs/zh/demo/markdown.md +403 -0
- package/template/docs/zh/demo/page.md +72 -0
- package/template/docs/zh/guide/README.md +16 -0
- package/template/docs/zh/guide/bar/README.md +13 -0
- package/template/docs/zh/guide/bar/baz.md +6 -0
- package/template/docs/zh/guide/foo/README.md +13 -0
- package/template/docs/zh/guide/foo/ray.md +6 -0
- package/template/{zh-CN/slide.md → docs/zh/slides.md} +1 -1
- package/template/public/assets/icon/apple-icon-152.png +0 -0
- package/template/public/assets/icon/chrome-192.png +0 -0
- package/template/public/assets/icon/chrome-512.png +0 -0
- package/template/public/assets/icon/chrome-mask-192.png +0 -0
- package/template/public/assets/icon/chrome-mask-512.png +0 -0
- package/template/public/assets/icon/guide-maskable.png +0 -0
- package/template/public/assets/icon/ms-icon-144.png +0 -0
- package/CHANGELOG.md +0 -184
- package/lib/node/index.d.ts +0 -1
- package/lib/node/index.js +0 -3
- package/lib/node/index.js.map +0 -1
- package/readme.md +0 -33
- package/rollup.config.js +0 -14
- package/src/node/checkVersion.ts +0 -31
- package/src/node/copy.ts +0 -45
- package/src/node/deepAssign.ts +0 -42
- package/src/node/hasYarn.ts +0 -10
- package/src/node/i18n.ts +0 -91
- package/src/node/index.ts +0 -177
- package/src/node/registry.ts +0 -31
- package/template/en-US/.vuepress/config.ts +0 -28
- package/template/en-US/.vuepress/navbar.ts +0 -52
- package/template/en-US/.vuepress/sidebar.ts +0 -46
- package/template/en-US/.vuepress/styles/index.scss +0 -0
- package/template/en-US/.vuepress/styles/palette.scss +0 -0
- package/template/en-US/.vuepress/themeConfig.ts +0 -96
- package/template/en-US/README.md +0 -48
- package/template/en-US/guide/markdown.md +0 -341
- package/template/en-US/guide/page.md +0 -66
- package/template/en-US/intro.md +0 -7
- package/template/en-US/posts/article/article1.md +0 -19
- package/template/en-US/posts/article/article3.md +0 -20
- package/template/en-US/posts/article/article4.md +0 -20
- package/template/en-US/posts/article/article7.md +0 -20
- package/template/en-US/posts/article/article8.md +0 -20
- package/template/en-US/posts/article10.md +0 -20
- package/template/en-US/posts/article11.md +0 -20
- package/template/en-US/posts/article9.md +0 -20
- package/template/i18n/.vuepress/config.ts +0 -33
- package/template/i18n/.vuepress/navbar/en.ts +0 -52
- package/template/i18n/.vuepress/navbar/index.ts +0 -2
- package/template/i18n/.vuepress/navbar/zh.ts +0 -52
- package/template/i18n/.vuepress/public/favicon.ico +0 -0
- package/template/i18n/.vuepress/public/logo.png +0 -0
- package/template/i18n/.vuepress/public/logo.svg +0 -1
- package/template/i18n/.vuepress/sidebar/en.ts +0 -48
- package/template/i18n/.vuepress/sidebar/index.ts +0 -2
- package/template/i18n/.vuepress/sidebar/zh.ts +0 -48
- package/template/i18n/.vuepress/styles/index.scss +0 -0
- package/template/i18n/.vuepress/styles/palette.scss +0 -0
- package/template/i18n/.vuepress/themeConfig.ts +0 -124
- package/template/i18n/guide/markdown.md +0 -341
- package/template/i18n/guide/page.md +0 -66
- package/template/i18n/home.md +0 -110
- package/template/i18n/intro.md +0 -7
- package/template/i18n/posts/article/article2.md +0 -20
- package/template/i18n/posts/article/article5.md +0 -20
- package/template/i18n/posts/article/article6.md +0 -21
- package/template/i18n/posts/article12.md +0 -21
- package/template/i18n/zh/guide/markdown.md +0 -339
- package/template/i18n/zh/guide/page.md +0 -66
- package/template/i18n/zh/posts/article/article2.md +0 -20
- package/template/i18n/zh/posts/article/article4.md +0 -20
- package/template/zh-CN/.vuepress/config.ts +0 -28
- package/template/zh-CN/.vuepress/navbar.ts +0 -52
- package/template/zh-CN/.vuepress/public/favicon.ico +0 -0
- package/template/zh-CN/.vuepress/public/logo.png +0 -0
- package/template/zh-CN/.vuepress/public/logo.svg +0 -1
- package/template/zh-CN/.vuepress/sidebar.ts +0 -46
- package/template/zh-CN/.vuepress/styles/index.scss +0 -0
- package/template/zh-CN/.vuepress/styles/palette.scss +0 -0
- package/template/zh-CN/.vuepress/themeConfig.ts +0 -96
- package/template/zh-CN/README.md +0 -48
- package/template/zh-CN/guide/markdown.md +0 -339
- package/template/zh-CN/guide/page.md +0 -66
- package/template/zh-CN/home.md +0 -109
- package/template/zh-CN/posts/article/article1.md +0 -19
- package/template/zh-CN/posts/article/article3.md +0 -20
- package/template/zh-CN/posts/article/article5.md +0 -20
- package/template/zh-CN/posts/article/article6.md +0 -21
- package/template/zh-CN/posts/article/article7.md +0 -20
- package/template/zh-CN/posts/article/article8.md +0 -20
- package/template/zh-CN/posts/article10.md +0 -20
- package/template/zh-CN/posts/article11.md +0 -20
- package/template/zh-CN/posts/article12.md +0 -21
- package/template/zh-CN/posts/article9.md +0 -20
- package/tsconfig.build.json +0 -10
- package/tsconfig.json +0 -8
- /package/template/{i18n/zh/guide → blog/zh/demo}/encrypt.md +0 -0
- /package/template/{zh-CN/guide → docs/zh/demo}/encrypt.md +0 -0
- /package/template/{en-US/.vuepress/public → public}/favicon.ico +0 -0
- /package/template/{en-US/.vuepress/public → public}/logo.png +0 -0
- /package/template/{en-US/.vuepress/public → public}/logo.svg +0 -0
package/src/node/index.ts
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync } from "fs";
|
|
3
|
-
import { resolve } from "path";
|
|
4
|
-
import { deepAssign } from "./deepAssign";
|
|
5
|
-
import { cac } from "cac";
|
|
6
|
-
import { prompt } from "inquirer";
|
|
7
|
-
import execa from "execa";
|
|
8
|
-
import { copy } from "./copy";
|
|
9
|
-
import { checkForNextVersion } from "./checkVersion";
|
|
10
|
-
import { detectYarn } from "./hasYarn";
|
|
11
|
-
import { getLanguage } from "./i18n";
|
|
12
|
-
import { getRegistry } from "./registry";
|
|
13
|
-
const cli = cac("vuepress-theme-hope");
|
|
14
|
-
|
|
15
|
-
const bin = detectYarn() ? "yarn" : "npm";
|
|
16
|
-
|
|
17
|
-
cli
|
|
18
|
-
.command("[dir]", "Generate a new vuepress-theme-hope project")
|
|
19
|
-
.action(async (dir: string) => {
|
|
20
|
-
if (!dir) return cli.outputHelp();
|
|
21
|
-
|
|
22
|
-
const { lang, message } = await getLanguage();
|
|
23
|
-
|
|
24
|
-
const targetFolder = resolve(process.cwd(), dir);
|
|
25
|
-
const packageJsonPath = resolve(process.cwd(), "package.json");
|
|
26
|
-
const scripts = {
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
28
|
-
"docs:build": `vuepress build ${dir}`,
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
30
|
-
"docs:clean-dev": `vuepress dev ${dir} --clean-cache`,
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
32
|
-
"docs:dev": `vuepress dev ${dir}`,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
console.log(message.getVersion);
|
|
36
|
-
|
|
37
|
-
const vuepressVersion = await checkForNextVersion("vuepress");
|
|
38
|
-
const themeVersion = await checkForNextVersion("vuepress-theme-hope");
|
|
39
|
-
|
|
40
|
-
const devDependencies = {
|
|
41
|
-
vuepress: `^${vuepressVersion}`,
|
|
42
|
-
"vuepress-theme-hope": `^${themeVersion}`,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
if (!existsSync(targetFolder)) mkdirSync(targetFolder);
|
|
46
|
-
|
|
47
|
-
if (existsSync(packageJsonPath)) {
|
|
48
|
-
console.log(message.updatePackage);
|
|
49
|
-
|
|
50
|
-
// eslint-disable-next-line
|
|
51
|
-
const packageContent: any = JSON.parse(
|
|
52
|
-
readFileSync(packageJsonPath, { encoding: "utf-8" })
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
deepAssign(packageContent, { scripts, devDependencies });
|
|
56
|
-
|
|
57
|
-
writeFileSync(
|
|
58
|
-
packageJsonPath,
|
|
59
|
-
`${JSON.stringify(packageContent, null, 2)}\n`,
|
|
60
|
-
{ encoding: "utf-8" }
|
|
61
|
-
);
|
|
62
|
-
} else {
|
|
63
|
-
console.log(message.createPackage);
|
|
64
|
-
|
|
65
|
-
interface PackageJsonAnswer {
|
|
66
|
-
name: string;
|
|
67
|
-
version: string;
|
|
68
|
-
description: string;
|
|
69
|
-
license: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const result = await prompt<PackageJsonAnswer>([
|
|
73
|
-
{
|
|
74
|
-
name: "name",
|
|
75
|
-
type: "input",
|
|
76
|
-
message: message.nameMessage,
|
|
77
|
-
default: "vuepress-theme-hope-template",
|
|
78
|
-
validate: (input: string): true | string =>
|
|
79
|
-
/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u.exec(
|
|
80
|
-
input
|
|
81
|
-
)
|
|
82
|
-
? true
|
|
83
|
-
: message.nameError,
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: "version",
|
|
87
|
-
type: "input",
|
|
88
|
-
message: message.versionMessage,
|
|
89
|
-
default: "2.0.0",
|
|
90
|
-
validate: (input: string): true | string =>
|
|
91
|
-
/^[0-9]+\.[0-9]+\.(?:[0=9]+|[0-9]+-[a-z]+\.[0-9])$/u.exec(input)
|
|
92
|
-
? true
|
|
93
|
-
: message.versionError,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: "description",
|
|
97
|
-
type: "input",
|
|
98
|
-
message: message.descriptionMessage,
|
|
99
|
-
default: "A project of vuepress-theme-hope",
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: "license",
|
|
103
|
-
type: "input",
|
|
104
|
-
message: message.licenseMessage,
|
|
105
|
-
default: "MIT",
|
|
106
|
-
},
|
|
107
|
-
]);
|
|
108
|
-
|
|
109
|
-
const packageContent = { ...result, scripts, devDependencies };
|
|
110
|
-
|
|
111
|
-
writeFileSync(
|
|
112
|
-
packageJsonPath,
|
|
113
|
-
`${JSON.stringify(packageContent, null, 2)}\n`,
|
|
114
|
-
{ encoding: "utf-8" }
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
interface I18nAnswer {
|
|
119
|
-
i18n: "Yes" | "No";
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const { i18n } = await prompt<I18nAnswer>([
|
|
123
|
-
{
|
|
124
|
-
name: "i18n",
|
|
125
|
-
type: "list",
|
|
126
|
-
message: message.i18nMessage,
|
|
127
|
-
choices: ["Yes", "No"],
|
|
128
|
-
},
|
|
129
|
-
]);
|
|
130
|
-
|
|
131
|
-
console.log(message.template);
|
|
132
|
-
|
|
133
|
-
const templateFolder = i18n === "Yes" ? "i18n" : lang;
|
|
134
|
-
|
|
135
|
-
copy(
|
|
136
|
-
resolve(__dirname, "../../template", templateFolder),
|
|
137
|
-
resolve(process.cwd(), dir)
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
console.log(message.install);
|
|
141
|
-
console.warn(message.wait);
|
|
142
|
-
|
|
143
|
-
const registry = await getRegistry(lang, bin);
|
|
144
|
-
|
|
145
|
-
execa.sync(bin, ["install", "--registry", registry], {
|
|
146
|
-
stdout: "inherit",
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
console.log(message.success);
|
|
150
|
-
|
|
151
|
-
const { choise } = await prompt<{ choise: "Yes" | "No" }>([
|
|
152
|
-
{
|
|
153
|
-
name: "choise",
|
|
154
|
-
type: "list",
|
|
155
|
-
message: message.devServerAsk,
|
|
156
|
-
choices: ["Yes", "No"],
|
|
157
|
-
},
|
|
158
|
-
]);
|
|
159
|
-
|
|
160
|
-
if (choise === "Yes") {
|
|
161
|
-
console.log(message.devServer);
|
|
162
|
-
|
|
163
|
-
await execa(bin, ["run", "docs:dev"], {
|
|
164
|
-
stdout: "inherit",
|
|
165
|
-
});
|
|
166
|
-
} else console.log(message.hint);
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
cli.help(() => [
|
|
170
|
-
{
|
|
171
|
-
title:
|
|
172
|
-
"yarn create vuepress-theme-hope <dir> / npm init vuepress-theme-hope <dir>",
|
|
173
|
-
body: "Create a vuepress-theme-hope template in <dir>",
|
|
174
|
-
},
|
|
175
|
-
]);
|
|
176
|
-
|
|
177
|
-
cli.parse();
|
package/src/node/registry.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { sync } from "execa";
|
|
2
|
-
import { prompt } from "inquirer";
|
|
3
|
-
|
|
4
|
-
import type { Lang } from "./i18n";
|
|
5
|
-
|
|
6
|
-
export interface RegistryAnswer {
|
|
7
|
-
registry: "国内镜像源" | "当前源";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const npmmirrorRegistry = "https://registry.npmmirror.com/";
|
|
11
|
-
|
|
12
|
-
const getUserRegistry = (bin: string): string =>
|
|
13
|
-
sync(bin ? "yarn" : "npm", ["config", "get", "registry"]).stdout;
|
|
14
|
-
|
|
15
|
-
export const getRegistry = async (lang: Lang, bin: string): Promise<string> => {
|
|
16
|
-
const userRegistry = getUserRegistry(bin);
|
|
17
|
-
|
|
18
|
-
if (lang === "en-US" || userRegistry === npmmirrorRegistry)
|
|
19
|
-
return userRegistry;
|
|
20
|
-
|
|
21
|
-
const { registry } = await prompt<RegistryAnswer>([
|
|
22
|
-
{
|
|
23
|
-
name: "registry",
|
|
24
|
-
type: "list",
|
|
25
|
-
message: "选择你想使用的源",
|
|
26
|
-
choices: ["国内镜像源", "当前源"],
|
|
27
|
-
},
|
|
28
|
-
]);
|
|
29
|
-
|
|
30
|
-
return registry === "国内镜像源" ? npmmirrorRegistry : userRegistry;
|
|
31
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { defineHopeConfig } from "vuepress-theme-hope";
|
|
2
|
-
import themeConfig from "./themeConfig";
|
|
3
|
-
|
|
4
|
-
export default defineHopeConfig({
|
|
5
|
-
base: "/",
|
|
6
|
-
|
|
7
|
-
dest: "./dist",
|
|
8
|
-
|
|
9
|
-
head: [
|
|
10
|
-
[
|
|
11
|
-
"link",
|
|
12
|
-
{
|
|
13
|
-
rel: "stylesheet",
|
|
14
|
-
href: "//at.alicdn.com/t/font_2410206_mfj6e1vbwo.css",
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
],
|
|
18
|
-
|
|
19
|
-
locales: {
|
|
20
|
-
"/": {
|
|
21
|
-
lang: "en-US",
|
|
22
|
-
title: "Theme Demo",
|
|
23
|
-
description: "A demo for vuepress-theme-hope",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
themeConfig,
|
|
28
|
-
});
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { defineNavbarConfig } from "vuepress-theme-hope";
|
|
2
|
-
|
|
3
|
-
export default defineNavbarConfig([
|
|
4
|
-
"/",
|
|
5
|
-
"/home",
|
|
6
|
-
{ text: "Guide", icon: "creative", link: "/guide/" },
|
|
7
|
-
{
|
|
8
|
-
text: "Posts",
|
|
9
|
-
icon: "edit",
|
|
10
|
-
prefix: "/posts/",
|
|
11
|
-
children: [
|
|
12
|
-
{
|
|
13
|
-
text: "Articles 1-4",
|
|
14
|
-
icon: "edit",
|
|
15
|
-
prefix: "article/",
|
|
16
|
-
children: [
|
|
17
|
-
{ text: "Article 1", icon: "edit", link: "article1" },
|
|
18
|
-
{ text: "Article 2", icon: "edit", link: "article2" },
|
|
19
|
-
"article3",
|
|
20
|
-
"article4",
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
text: "Articles 5-12",
|
|
25
|
-
icon: "edit",
|
|
26
|
-
children: [
|
|
27
|
-
{
|
|
28
|
-
text: "Article 5",
|
|
29
|
-
icon: "edit",
|
|
30
|
-
link: "article/article5",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
text: "Article 6",
|
|
34
|
-
icon: "edit",
|
|
35
|
-
link: "article/article6",
|
|
36
|
-
},
|
|
37
|
-
"article/article7",
|
|
38
|
-
"article/article8",
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
{ text: "Article 9", icon: "edit", link: "article9" },
|
|
42
|
-
{ text: "Article 10", icon: "edit", link: "article10" },
|
|
43
|
-
"article11",
|
|
44
|
-
"article12",
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
text: "Theme Docs",
|
|
49
|
-
icon: "note",
|
|
50
|
-
link: "https://vuepress-theme-hope.github.io/v2/",
|
|
51
|
-
},
|
|
52
|
-
]);
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { defineSidebarConfig } from "vuepress-theme-hope";
|
|
2
|
-
|
|
3
|
-
export default defineSidebarConfig([
|
|
4
|
-
"",
|
|
5
|
-
"home",
|
|
6
|
-
"slide",
|
|
7
|
-
{
|
|
8
|
-
icon: "creative",
|
|
9
|
-
text: "Guide",
|
|
10
|
-
prefix: "guide/",
|
|
11
|
-
link: "guide/",
|
|
12
|
-
children: "structure",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
text: "Articles",
|
|
16
|
-
icon: "note",
|
|
17
|
-
prefix: "posts/",
|
|
18
|
-
children: [
|
|
19
|
-
{
|
|
20
|
-
text: "Articles 1-4",
|
|
21
|
-
icon: "note",
|
|
22
|
-
collapsable: true,
|
|
23
|
-
prefix: "article/",
|
|
24
|
-
children: ["article1", "article2", "article3", "article4"],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
text: "Articles 5-12",
|
|
28
|
-
icon: "note",
|
|
29
|
-
children: [
|
|
30
|
-
{
|
|
31
|
-
text: "Articles 5-8",
|
|
32
|
-
icon: "note",
|
|
33
|
-
collapsable: true,
|
|
34
|
-
prefix: "article/",
|
|
35
|
-
children: ["article5", "article6", "article7", "article8"],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
text: "Articles 9-12",
|
|
39
|
-
icon: "note",
|
|
40
|
-
children: ["article9", "article10", "article11", "article12"],
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
]);
|
|
File without changes
|
|
File without changes
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { defineThemeConfig } from "vuepress-theme-hope";
|
|
2
|
-
import navbar from "./navbar";
|
|
3
|
-
import sidebar from "./sidebar";
|
|
4
|
-
|
|
5
|
-
export default defineThemeConfig({
|
|
6
|
-
hostname: "https://vuepress-theme-hope-v2-demo.mrhope.site",
|
|
7
|
-
|
|
8
|
-
author: {
|
|
9
|
-
name: "Mr.Hope",
|
|
10
|
-
url: "https://mrhope.site",
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
iconPrefix: "iconfont icon-",
|
|
14
|
-
|
|
15
|
-
logo: "/logo.svg",
|
|
16
|
-
|
|
17
|
-
repo: "https://github.com/vuepress-theme-hope/vuepress-theme-hope",
|
|
18
|
-
|
|
19
|
-
docsDir: "demo/src",
|
|
20
|
-
|
|
21
|
-
// navbar
|
|
22
|
-
navbar: navbar,
|
|
23
|
-
|
|
24
|
-
// sidebar
|
|
25
|
-
sidebar: sidebar,
|
|
26
|
-
|
|
27
|
-
footer: "Default footer",
|
|
28
|
-
|
|
29
|
-
displayFooter: true,
|
|
30
|
-
|
|
31
|
-
pageInfo: ["Author", "Original", "Date", "Category", "Tag", "ReadingTime"],
|
|
32
|
-
|
|
33
|
-
blog: {
|
|
34
|
-
description: "A FrontEnd programmer",
|
|
35
|
-
intro: "/intro.html",
|
|
36
|
-
medias: {
|
|
37
|
-
Baidu: "https://example.com",
|
|
38
|
-
Bitbucket: "https://example.com",
|
|
39
|
-
Dingding: "https://example.com",
|
|
40
|
-
Discord: "https://example.com",
|
|
41
|
-
Dribbble: "https://example.com",
|
|
42
|
-
Email: "https://example.com",
|
|
43
|
-
Evernote: "https://example.com",
|
|
44
|
-
Facebook: "https://example.com",
|
|
45
|
-
Flipboard: "https://example.com",
|
|
46
|
-
Gitee: "https://example.com",
|
|
47
|
-
GitHub: "https://example.com",
|
|
48
|
-
Gitlab: "https://example.com",
|
|
49
|
-
Gmail: "https://example.com",
|
|
50
|
-
Instagram: "https://example.com",
|
|
51
|
-
Lines: "https://example.com",
|
|
52
|
-
Linkedin: "https://example.com",
|
|
53
|
-
Pinterest: "https://example.com",
|
|
54
|
-
Pocket: "https://example.com",
|
|
55
|
-
QQ: "https://example.com",
|
|
56
|
-
Qzone: "https://example.com",
|
|
57
|
-
Reddit: "https://example.com",
|
|
58
|
-
Rss: "https://example.com",
|
|
59
|
-
Steam: "https://example.com",
|
|
60
|
-
Twitter: "https://example.com",
|
|
61
|
-
Wechat: "https://example.com",
|
|
62
|
-
Weibo: "https://example.com",
|
|
63
|
-
Whatsapp: "https://example.com",
|
|
64
|
-
Youtube: "https://example.com",
|
|
65
|
-
Zhihu: "https://example.com",
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
encrypt: {
|
|
70
|
-
config: {
|
|
71
|
-
"/guide/encrypt.html": ["1234"],
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
plugins: {
|
|
76
|
-
blog: {
|
|
77
|
-
autoExcerpt: true,
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
// you can also use Waline
|
|
81
|
-
comment: {
|
|
82
|
-
type: "giscus",
|
|
83
|
-
repo: "vuepress-theme-hope/giscus-discussions",
|
|
84
|
-
repoId: "R_kgDOG_Pt2A",
|
|
85
|
-
category: "Announcements",
|
|
86
|
-
categoryId: "DIC_kwDOG_Pt2M4COD69",
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
mdEnhance: {
|
|
90
|
-
enableAll: true,
|
|
91
|
-
presentation: {
|
|
92
|
-
plugins: ["highlight", "math", "search", "notes", "zoom"],
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
});
|
package/template/en-US/README.md
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
home: true
|
|
3
|
-
layout: Blog
|
|
4
|
-
icon: home
|
|
5
|
-
title: Blog Home
|
|
6
|
-
heroImage: /logo.svg
|
|
7
|
-
heroText: the name of your blog
|
|
8
|
-
tagline: You can put your slogan here
|
|
9
|
-
heroFullScreen: true
|
|
10
|
-
projects:
|
|
11
|
-
- icon: project
|
|
12
|
-
name: project name
|
|
13
|
-
desc: project detailed description
|
|
14
|
-
link: https://your.project.link
|
|
15
|
-
|
|
16
|
-
- icon: link
|
|
17
|
-
name: link name
|
|
18
|
-
desc: link detailed description
|
|
19
|
-
link: https://link.address
|
|
20
|
-
|
|
21
|
-
- icon: book
|
|
22
|
-
name: book name
|
|
23
|
-
desc: Detailed description of the book
|
|
24
|
-
link: https://link.to.your.book
|
|
25
|
-
|
|
26
|
-
- icon: article
|
|
27
|
-
name: article name
|
|
28
|
-
desc: Detailed description of the article
|
|
29
|
-
link: https://link.to.your.article
|
|
30
|
-
|
|
31
|
-
- icon: friend
|
|
32
|
-
name: friend name
|
|
33
|
-
desc: Detailed description of friend
|
|
34
|
-
link: https://link.to.your.friend
|
|
35
|
-
|
|
36
|
-
- icon: /logo.svg
|
|
37
|
-
name: custom item
|
|
38
|
-
desc: Detailed description of this custom item
|
|
39
|
-
link: https://link.to.your.friend
|
|
40
|
-
|
|
41
|
-
footer: customize your footer text
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
This is a blog home page.
|
|
45
|
-
|
|
46
|
-
To use this layout, you should set both `layout: Blog` and `home: true` in the page front matter.
|
|
47
|
-
|
|
48
|
-
For related configuration docs, please see [blog homepage](https://vuepress-theme-hope.github.io/v2/guide/blog/home/).
|