create-vuepress-theme-hope 2.0.0-beta.78 → 2.0.0-beta.80
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/lib/index.js +1 -1
- package/package.json +1 -1
- package/template/en-US/.vuepress/theme.ts +6 -6
- package/template/en-US/README.md +1 -1
- package/template/en-US/guide/README.md +4 -3
- package/template/en-US/guide/disable.md +4 -4
- package/template/en-US/guide/markdown.md +128 -26
- package/template/en-US/guide/page.md +23 -17
- package/template/en-US/home.md +1 -1
- package/template/i18n/.vuepress/theme.ts +6 -6
- package/template/i18n/README.md +1 -1
- package/template/i18n/guide/README.md +4 -3
- package/template/i18n/guide/disable.md +4 -4
- package/template/i18n/guide/markdown.md +130 -26
- package/template/i18n/guide/page.md +23 -17
- package/template/i18n/home.md +1 -1
- package/template/i18n/zh/README.md +1 -1
- package/template/i18n/zh/guide/README.md +4 -3
- package/template/i18n/zh/guide/disable.md +4 -4
- package/template/i18n/zh/guide/markdown.md +110 -24
- package/template/i18n/zh/guide/page.md +20 -14
- package/template/i18n/zh/home.md +1 -1
- package/template/zh-CN/.vuepress/theme.ts +6 -6
- package/template/zh-CN/README.md +1 -1
- package/template/zh-CN/guide/README.md +4 -3
- package/template/zh-CN/guide/disable.md +4 -4
- package/template/zh-CN/guide/markdown.md +110 -24
- package/template/zh-CN/guide/page.md +20 -14
- package/template/zh-CN/home.md +3 -3
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{cac as e}from"cac";import{execaCommandSync as s,execaCommand as n}from"execa";import t from"inquirer";import{existsSync as r,readFileSync as o,writeFileSync as a,readdirSync as i,mkdirSync as c,statSync as p,createReadStream as l,createWriteStream as u}from"fs";import{resolve as
|
|
2
|
+
import{cac as e}from"cac";import{execaCommandSync as s,execaCommand as n}from"execa";import t from"inquirer";import{existsSync as r,readFileSync as o,writeFileSync as a,readdirSync as i,mkdirSync as c,statSync as p,createReadStream as l,createWriteStream as u}from"fs";import{resolve as m,dirname as d,join as g}from"path";import{get as h}from"https";import{fileURLToPath as v}from"url";const f=(()=>{try{return 0===s("pnpm --version",{stdio:"ignore"}).exitCode}catch(e){return!1}})()?"pnpm":(()=>{try{return 0===s("yarn --version",{stdio:"ignore"}).exitCode}catch(e){return!1}})()?"yarn":"npm",y={"简体中文":{getVersion:"获取依赖的最新版本...",createPackage:"生成 package.json...",updatePackage:"更新 package.json...",template:"生成模板...",wait:"这可能需要数分钟,请耐心等待.\n我们无法正确输出子进程的进度条,所以进程可能会看似未响应",install:"安装依赖...",success:"模板已成功生成!",devServerAsk:"是否想要现在启动 Demo 查看?",devServer:"启动开发服务器...\n启动成功后,请在浏览器输入给出的开发服务器地址(默认为 'localhost:8080')",hint:`提示: 请使用 "${f} run docs:dev" 命令启动开发服务器`,nameMessage:"设置应用名称",nameError:"应用名称应只包含小写字母、数字和连接线 (-)",versionMessage:"设置应用版本号",versionError:"此版本无效,版本号应为 'x.x.x'",dirError:'"[dir]" 的方括号表示此处为一个参数,你应该替换为自己想使用的文件夹名称,如 "src", "docs" 等!\n例如: "npm init vuepress-theme-hope@next docs"',descriptionMessage:"设置应用描述",licenseMessage:"设置协议",i18nMessage:"项目需要用到多语言么?",gitMessage:"是否初始化 Git 仓库?",workflowMessage:"是否需要一个自动部署文档到 GitHub Pages 的工作流?"},"english (US)":{getVersion:"Getting lastest version of deps...",createPackage:"Generating package.json...",updatePackage:"Updating package.json...",template:"Generating Template...",wait:"This may take a few minutes, please be patient.\nWe can not correctly output progress bar from child process, so the process may look stuck.",install:"Installing Deps...",success:"Successful Generated!",devServerAsk:"Would you like to preview template now?",devServer:"Staring dev server...\nAfter the dev server starts running, please visit the given server link ('localhost:8080' by default)",hint:`Hint: You should execute "${f} run docs:dev" to start dev server.`,nameMessage:"Your project name",nameError:"package name should only contain lowercase characters, numbers and dash",versionMessage:"Your project version",versionError:"This version is not a valid one. Version should be like 'x.x.x'",dirError:'The brackets in "[dir]" means it is an argument, you should replace it with folder name you want to use! E.g.: "src", "docs"\nFor example: "npm init vuepress-theme-hope@next docs"',descriptionMessage:"Your project description",licenseMessage:"Your project lincense",i18nMessage:"Does the project need multiple languages?",gitMessage:"Initialize a git repository?",workflowMessage:"Do you need a GitHub workflow to deploy docs on GitHub pages?"}},w=async e=>{for(let s=1;s<=3;s++){const n=await new Promise(((s,n)=>{h(`${"npm"===f?"https://registry.npmjs.org":"https://registry.yarnpkg.com"}/-/package/${e}/dist-tags`,(e=>{if(200===e.statusCode){let n="";e.on("data",(e=>n+=e)),e.on("end",(()=>{s(JSON.parse(n).next)}))}else n()})).on("error",(()=>{n()}))})).catch((()=>{console.log(`Get ${e} version failed, [${s}/3]`)}));if(n)return n}throw new Error(`Get ${e} version failed!`)},$=(e,...s)=>{if(0===s.length)return e;const n=s.shift()||{};return Object.keys(n).forEach((s=>{"object"!=typeof e[s]||Array.isArray(e[s])||"object"!=typeof n[s]||Array.isArray(n[s])?"object"==typeof n[s]?Array.isArray(n[s])?e[s]=[...n[s]]:e[s]={...n[s]}:e[s]=n[s]:$(e[s],n[s])})),$(e,...s)},k=async(e,s)=>{const n=m(process.cwd(),"package.json"),i=(e=>({"docs:build":`vuepress build ${e}`,"docs:clean-dev":`vuepress dev ${e} --clean-cache`,"docs:dev":`vuepress dev ${e}`}))(e),c=await(async e=>Object.fromEntries(await Promise.all(e.map((async e=>[e,`^${await w(e)}`])))))(["@vuepress/client","vue","vuepress","vuepress-theme-hope"]);if(r(n)){console.log(s.updatePackage);const e=JSON.parse(o(n,{encoding:"utf-8"}));$(e,{scripts:i,devDependencies:c}),a(n,`${JSON.stringify(e,null,2)}\n`,{encoding:"utf-8"})}else{console.log(s.createPackage);const e={...await t.prompt([{name:"name",type:"input",message:s.nameMessage,default:"vuepress-theme-hope-template",validate:e=>!!/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u.exec(e)||s.nameError},{name:"version",type:"input",message:s.versionMessage,default:"2.0.0",validate:e=>!!/^[0-9]+\.[0-9]+\.(?:[0=9]+|[0-9]+-[a-z]+\.[0-9])$/u.exec(e)||s.versionError},{name:"description",type:"input",message:s.descriptionMessage,default:"A project of vuepress-theme-hope"},{name:"license",type:"input",message:s.licenseMessage,default:"MIT"}]),scripts:i,devDependencies:c};a(n,`${JSON.stringify(e,null,2)}\n`,{encoding:"utf-8"})}},b=async e=>{const n=s(`${f} config get registry`).stdout;if("简体中文"===e){const{registry:e}=await t.prompt([{name:"registry",type:"list",message:"选择你想使用的源",choices:["国内镜像源","当前源"]}]);return"国内镜像源"===e?"https://registry.npmmirror.com/":n}return n},x=e=>{try{i(e)}catch(s){c(e,{recursive:!0})}},M=(e,s)=>{const n=d(s);x(n);const t=l(e),r=u(s);t.pipe(r)},j=(e,s)=>{x(s);i(e,{withFileTypes:!0}).forEach((n=>{n.isFile()?M(`${e}/${n.name}`,`${s}/${n.name}`):n.isDirectory()&&j(`${e}/${n.name}`,`${s}/${n.name}`)}))},S=v(import.meta.url),D=d(S),E=e=>{const s=m(process.cwd(),".gitignore"),n=r(s)?o(s,{encoding:"utf-8"}):"";a(s,`${n}${(e=>`\nnode_modules/\n${e}/.vuepress/.cache/\n${e}/.vuepress/.temp/\n${e}/.vuepress/dist/\n`)(e)}`,{encoding:"utf-8"})},G=async(e,n,r)=>{const{i18n:o,workflow:i}=await t.prompt([{name:"i18n",type:"confirm",message:r.i18nMessage,default:!1},{name:"workflow",type:"confirm",message:r.workflowMessage,default:!0}]);console.log(r.template);var c,l;if(c=m(D,"../template",o?"i18n":"简体中文"===n?"zh-CN":"en-US"),l=m(process.cwd(),e),p(c).isDirectory()?j(c,l):p(c).isFile()&&M(c,l),i){const s=m(process.cwd(),".github/workflows");x(s),a(m(s,"deploy-docs.yml"),((e,s)=>`\nname: ${"简体中文"===s?"部署文档":"Deploy Docs"}\n\non:\n push:\n branches:\n # ${"简体中文"===s?"确保这是你正在使用的分支名称":"make sure this is the branch you are using"}\n - main\n\njobs:\n deploy-gh-pages:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v3\n with:\n fetch-depth: 0\n # ${"简体中文"===s?"如果你文档需要 Git 子模块,取消注释下一行":"if your docs needs submodules, uncomment the following line"}\n # submodules: true\n\n${"pnpm"===f?`\n - name: ${"简体中文"===s?"安装 pnpm":"Install pnpm"}\n uses: pnpm/action-setup@v2\n with:\n version: 7\n run_install: true\n`:""}\n\n - name: ${"简体中文"===s?"设置 Node.js":"Setup Node.js"}\n uses: actions/setup-node@v3\n with:\n node-version: 16\n cache: ${f}\n\n - name: ${"简体中文"===s?"安装依赖":"Install Deps"}\n run: ${"npm"===f?"npm install":`${f} install --frozen-lockfile`}\n\n - name: ${"简体中文"===s?"构建文档":"Build Docs"}\n env:\n NODE_OPTIONS: --max_old_space_size=4096\n run: ${f} run docs:build\n\n - name: ${"简体中文"===s?"部署文档":"Deploy Docs"}\n uses: JamesIves/github-pages-deploy-action@v4\n with:\n # ${"简体中文"===s?"这是文档部署到的分支名称":"This is the branch where the docs are deployed to"}\n branch: gh-pages\n folder: ${g(e,".vuepress/dist").replace(/\\/g,"/")}\n\n`)(e,n),{encoding:"utf-8"})}if((()=>{try{return s("git log"),!0}catch{return!1}})())E(e);else if((()=>{try{return s("git log"),!0}catch{return!1}})()){const{git:n}=await t.prompt([{name:"git",type:"confirm",message:r.gitMessage,default:!0}]);n&&(s("git init"),E(e))}};var A="2.0.0-beta.79";const P=e("vuepress-theme-hope"),z=A;P.command("[dir]","Generate a new vuepress-theme-hope project").usage("pnpm create vuepress-theme-hope@next [dir] / npm init vuepress-theme-hope@next [dir]").example("docs").action((async e=>{if(!e)return P.outputHelp();const{lang:r,message:o}=await(async()=>{const{language:e}=await t.prompt([{name:"language",type:"list",message:"Select a language to display / 选择显示语言",choices:["english (US)","简体中文"]}]);return{lang:e,message:y[e]}})();if(e.startsWith("[")&&e.endsWith("]"))return console.log(o.dirError);console.log(o.getVersion),await k(e,o),await G(e,r,o);const a=await b(r);console.log(o.install),console.warn(o.wait),s(`${f} install ${"pnpm"===f?"":`--registry ${a}`}`,{stdout:"inherit"}),console.log(o.success);const{choice:i}=await t.prompt([{name:"choice",type:"confirm",message:o.devServerAsk,default:!0}]);i?(console.log(o.devServer),await n(`${f} run docs:dev`,{stdout:"inherit"})):console.log(o.hint)})),P.help((()=>[{title:"pnpm create vuepress-theme-hope@next [dir] / npm init vuepress-theme-hope@next [dir]",body:"Create a vuepress-theme-hope template in [dir]"}])),P.version(z),P.parse();
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ export default hopeTheme({
|
|
|
10
10
|
url: "https://mrhope.site",
|
|
11
11
|
},
|
|
12
12
|
|
|
13
|
-
iconAssets: "
|
|
13
|
+
iconAssets: "iconfont",
|
|
14
14
|
|
|
15
15
|
logo: "/logo.svg",
|
|
16
16
|
|
|
@@ -82,24 +82,24 @@ export default hopeTheme({
|
|
|
82
82
|
// To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
|
|
83
83
|
comment: {
|
|
84
84
|
/**
|
|
85
|
-
* Using
|
|
85
|
+
* Using Giscus
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
provider: "Giscus",
|
|
88
88
|
repo: "vuepress-theme-hope/giscus-discussions",
|
|
89
89
|
repoId: "R_kgDOG_Pt2A",
|
|
90
90
|
category: "Announcements",
|
|
91
91
|
categoryId: "DIC_kwDOG_Pt2M4COD69",
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* Using
|
|
94
|
+
* Using Twikoo
|
|
95
95
|
*/
|
|
96
|
-
//
|
|
96
|
+
// provider: "Twikoo",
|
|
97
97
|
// envId: "https://twikoo.ccknbc.vercel.app",
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* Using Waline
|
|
101
101
|
*/
|
|
102
|
-
//
|
|
102
|
+
// provider: "Waline",
|
|
103
103
|
// serverURL: "https://vuepress-theme-hope-comment.vercel.app",
|
|
104
104
|
},
|
|
105
105
|
|
package/template/en-US/README.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
+
title: Guides
|
|
2
3
|
index: false
|
|
3
4
|
icon: creative
|
|
4
5
|
category:
|
|
5
6
|
- Guide
|
|
6
7
|
---
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- [Page Config](page.md)
|
|
9
|
+
## Catalog
|
|
11
10
|
|
|
12
11
|
- [Markdown Enhance](markdown.md)
|
|
13
12
|
|
|
13
|
+
- [Page Config](page.md)
|
|
14
|
+
|
|
14
15
|
- [Function Disable](disable.md)
|
|
15
16
|
|
|
16
17
|
- [Encryption Demo](encrypt.md)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
title: Component disabled
|
|
2
|
+
title: Disabling layout and features
|
|
4
3
|
icon: config
|
|
4
|
+
order: 3
|
|
5
5
|
category:
|
|
6
6
|
- Guide
|
|
7
7
|
tag:
|
|
@@ -23,11 +23,11 @@ footer: false
|
|
|
23
23
|
backtotop: false
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
You can disable some
|
|
26
|
+
You can disable some function and layout on the page by setting the Frontmatter of the page.
|
|
27
27
|
|
|
28
28
|
<!-- more -->
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
This page is an demo that disables the following features:
|
|
31
31
|
|
|
32
32
|
- Navbar
|
|
33
33
|
- Sidebar
|
|
@@ -1,40 +1,70 @@
|
|
|
1
1
|
---
|
|
2
|
-
order: 2
|
|
3
|
-
icon: markdown
|
|
4
2
|
title: Markdown Enhance
|
|
3
|
+
icon: markdown
|
|
4
|
+
order: 2
|
|
5
5
|
category:
|
|
6
6
|
- Guide
|
|
7
7
|
tag:
|
|
8
8
|
- Markdown
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
VuePress basically generate pages from Markdown files. So you can use it to generate documentation or blog sites easily.
|
|
12
12
|
|
|
13
|
-
You
|
|
13
|
+
You should create and write Markdown files, so that VuePress can convert them to different pages according to file structure.
|
|
14
14
|
|
|
15
15
|
<!-- more -->
|
|
16
16
|
|
|
17
17
|
## Markdown Introduction
|
|
18
18
|
|
|
19
|
-
If you are a new learner and don’t know how to write Markdown, please read [Markdown Intro](https://vuepress-theme-hope.github.io/v2/
|
|
19
|
+
If you are a new learner and don’t know how to write Markdown, please read [Markdown Intro](https://vuepress-theme-hope.github.io/v2/cookbook/markdown/) and [Markdown Demo](https://vuepress-theme-hope.github.io/v2/cookbook/markdown/demo.html).
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
## Markdown Config
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
VuePress introduce configuration for each markdown page using Frontmatter.
|
|
24
|
+
|
|
25
|
+
::: info
|
|
26
|
+
|
|
27
|
+
Frontmatter is a important concept in VuePress. If you don’t know it, you need to read [Frontmatter Introduction](https://vuepress-theme-hope.github.io/v2/cookbook/vuepress/page.html#front-matter).
|
|
24
28
|
|
|
25
29
|
:::
|
|
26
30
|
|
|
27
|
-
##
|
|
31
|
+
## Markdown Extension
|
|
32
|
+
|
|
33
|
+
The Markdown content in VuePress will be parsed by [markdown-it](https://github.com/markdown-it/markdown-it), which supports [syntax extensions](https://github.com/markdown-it/markdown-it#syntax-extensions) via markdown-it plugins.
|
|
34
|
+
|
|
35
|
+
### VuePress Enhancement
|
|
28
36
|
|
|
29
37
|
To enrich document writing, VuePress has extended Markdown syntax.
|
|
30
38
|
|
|
31
39
|
For these extensions, please read [Markdown extensions in VuePress](https://vuepress-theme-hope.github.io/v2/basic/vuepress/markdown.html).
|
|
32
40
|
|
|
33
|
-
|
|
41
|
+
### Theme Enhancement
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
By using [`vuepress-plugin-md-enhance`][md-enhance], the theme extends more Markdown syntax and provides richer writing functions.
|
|
36
44
|
|
|
37
|
-
|
|
45
|
+
:::: tip Enable all
|
|
46
|
+
|
|
47
|
+
You can set `plugins.mdEnhance.enableAll: true` in theme options to enable all features of the [md-enhance][md-enhance] plugin.
|
|
48
|
+
|
|
49
|
+
::: code-tabs#language
|
|
50
|
+
|
|
51
|
+
@tab TS
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { hopeTheme } from "vuepress-theme-hope";
|
|
55
|
+
|
|
56
|
+
export default {
|
|
57
|
+
theme: hopeTheme({
|
|
58
|
+
plugins: {
|
|
59
|
+
mdEnhance: {
|
|
60
|
+
enableAll: true,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
};
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
@tab JS
|
|
38
68
|
|
|
39
69
|
```js
|
|
40
70
|
const { hopeTheme } = require("vuepress-theme-hope");
|
|
@@ -50,9 +80,11 @@ module.exports = {
|
|
|
50
80
|
};
|
|
51
81
|
```
|
|
52
82
|
|
|
53
|
-
|
|
83
|
+
:::
|
|
54
84
|
|
|
55
|
-
|
|
85
|
+
::::
|
|
86
|
+
|
|
87
|
+
#### Custom Container
|
|
56
88
|
|
|
57
89
|
::: v-pre
|
|
58
90
|
|
|
@@ -136,7 +168,29 @@ A custom details container
|
|
|
136
168
|
|
|
137
169
|
::::
|
|
138
170
|
|
|
139
|
-
|
|
171
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/container.html)
|
|
172
|
+
|
|
173
|
+
### Tabs
|
|
174
|
+
|
|
175
|
+
::: tabs#fruit
|
|
176
|
+
|
|
177
|
+
@tab apple
|
|
178
|
+
|
|
179
|
+
Apple
|
|
180
|
+
|
|
181
|
+
@tab banana
|
|
182
|
+
|
|
183
|
+
Banana
|
|
184
|
+
|
|
185
|
+
@tab orange
|
|
186
|
+
|
|
187
|
+
Orange
|
|
188
|
+
|
|
189
|
+
:::
|
|
190
|
+
|
|
191
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/tabs.html)
|
|
192
|
+
|
|
193
|
+
#### Code Tabs
|
|
140
194
|
|
|
141
195
|
::: code-tabs
|
|
142
196
|
|
|
@@ -162,13 +216,13 @@ npm i -D vuepress-theme-hope
|
|
|
162
216
|
|
|
163
217
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/code-tabs.html)
|
|
164
218
|
|
|
165
|
-
|
|
219
|
+
#### Superscript and Subscript
|
|
166
220
|
|
|
167
221
|
19^th^ H~2~O
|
|
168
222
|
|
|
169
223
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/sup-sub.html)
|
|
170
224
|
|
|
171
|
-
|
|
225
|
+
#### Align
|
|
172
226
|
|
|
173
227
|
::: center
|
|
174
228
|
|
|
@@ -184,7 +238,7 @@ I am right align
|
|
|
184
238
|
|
|
185
239
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/align.html)
|
|
186
240
|
|
|
187
|
-
|
|
241
|
+
#### Footnote
|
|
188
242
|
|
|
189
243
|
This text has footnote[^first].
|
|
190
244
|
|
|
@@ -192,20 +246,26 @@ This text has footnote[^first].
|
|
|
192
246
|
|
|
193
247
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/footnote.html)
|
|
194
248
|
|
|
195
|
-
|
|
249
|
+
#### Mark
|
|
196
250
|
|
|
197
251
|
You can mark ==important words== .
|
|
198
252
|
|
|
199
253
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/mark.html)
|
|
200
254
|
|
|
201
|
-
|
|
255
|
+
#### Tasklist
|
|
202
256
|
|
|
203
257
|
- [x] Plan A
|
|
204
258
|
- [ ] Plan B
|
|
205
259
|
|
|
206
260
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/tasklist.html)
|
|
207
261
|
|
|
208
|
-
|
|
262
|
+
#### Image Enhancement
|
|
263
|
+
|
|
264
|
+
Support setting color scheme and size
|
|
265
|
+
|
|
266
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/image.md)
|
|
267
|
+
|
|
268
|
+
#### Chart
|
|
209
269
|
|
|
210
270
|
::: chart A Scatter Chart
|
|
211
271
|
|
|
@@ -239,9 +299,35 @@ You can mark ==important words== .
|
|
|
239
299
|
|
|
240
300
|
:::
|
|
241
301
|
|
|
242
|
-
- [View Detail](
|
|
302
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/chart.html)
|
|
243
303
|
|
|
244
|
-
|
|
304
|
+
#### Echarts
|
|
305
|
+
|
|
306
|
+
::: echarts A line chart
|
|
307
|
+
|
|
308
|
+
```json
|
|
309
|
+
{
|
|
310
|
+
"xAxis": {
|
|
311
|
+
"type": "category",
|
|
312
|
+
"data": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
|
|
313
|
+
},
|
|
314
|
+
"yAxis": {
|
|
315
|
+
"type": "value"
|
|
316
|
+
},
|
|
317
|
+
"series": [
|
|
318
|
+
{
|
|
319
|
+
"data": [150, 230, 224, 218, 135, 147, 260],
|
|
320
|
+
"type": "line"
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
:::
|
|
327
|
+
|
|
328
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/echarts.html)
|
|
329
|
+
|
|
330
|
+
#### Flowchart
|
|
245
331
|
|
|
246
332
|
```flow
|
|
247
333
|
cond=>condition: Process?
|
|
@@ -254,7 +340,7 @@ cond(no)->e
|
|
|
254
340
|
|
|
255
341
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/flowchart.html)
|
|
256
342
|
|
|
257
|
-
|
|
343
|
+
#### Mermaid
|
|
258
344
|
|
|
259
345
|
```mermaid
|
|
260
346
|
flowchart TB
|
|
@@ -275,7 +361,7 @@ flowchart TB
|
|
|
275
361
|
|
|
276
362
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/mermaid.html)
|
|
277
363
|
|
|
278
|
-
|
|
364
|
+
#### Tex
|
|
279
365
|
|
|
280
366
|
$$
|
|
281
367
|
\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right)
|
|
@@ -284,7 +370,13 @@ $$
|
|
|
284
370
|
|
|
285
371
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/tex.html)
|
|
286
372
|
|
|
287
|
-
|
|
373
|
+
#### Include files
|
|
374
|
+
|
|
375
|
+
@include(./README.md{11-17})
|
|
376
|
+
|
|
377
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/include.md)
|
|
378
|
+
|
|
379
|
+
#### Code Demo
|
|
288
380
|
|
|
289
381
|
::: normal-demo A normal demo
|
|
290
382
|
|
|
@@ -309,7 +401,15 @@ span {
|
|
|
309
401
|
|
|
310
402
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/demo.html)
|
|
311
403
|
|
|
312
|
-
|
|
404
|
+
#### Stylize
|
|
405
|
+
|
|
406
|
+
<!-- markdownlint-disable MD033 -->
|
|
407
|
+
|
|
408
|
+
Setting this to a invalid stytax <span style="color:red">doesn't</span> have any effect.
|
|
409
|
+
|
|
410
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/stylize.md)
|
|
411
|
+
|
|
412
|
+
#### Presentation
|
|
313
413
|
|
|
314
414
|
@slidestart
|
|
315
415
|
|
|
@@ -343,3 +443,5 @@ $$
|
|
|
343
443
|
@slideend
|
|
344
444
|
|
|
345
445
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/presentation.html)
|
|
446
|
+
|
|
447
|
+
[md-enhance]: https://vuepress-theme-hope.github.io/v2/md-enhance/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
# This control sidebar index
|
|
3
|
-
order: 1
|
|
4
|
-
# This is the icon of the page
|
|
5
|
-
icon: page
|
|
6
2
|
# This is the title of the article
|
|
7
3
|
title: page config
|
|
4
|
+
# This is the icon of the page
|
|
5
|
+
icon: page
|
|
6
|
+
# This control sidebar order
|
|
7
|
+
order: 1
|
|
8
8
|
# Set author
|
|
9
9
|
author: Ms.Hope
|
|
10
10
|
# Set writing time
|
|
@@ -18,10 +18,12 @@ tag:
|
|
|
18
18
|
- Guide
|
|
19
19
|
# this page is sticky in article list
|
|
20
20
|
sticky: true
|
|
21
|
-
# this page will appear in
|
|
21
|
+
# this page will appear in starred articles
|
|
22
22
|
star: true
|
|
23
|
-
# You can customize
|
|
23
|
+
# You can customize footer content
|
|
24
24
|
footer: Footer content for test
|
|
25
|
+
# You can customize copyright content
|
|
26
|
+
copyright: No Copyright
|
|
25
27
|
---
|
|
26
28
|
|
|
27
29
|
Content before `more` comment is regarded as page excerpt.
|
|
@@ -32,23 +34,20 @@ Content before `more` comment is regarded as page excerpt.
|
|
|
32
34
|
|
|
33
35
|
You can set page information in Markdown’s Frontmatter.
|
|
34
36
|
|
|
35
|
-
- The author is
|
|
36
|
-
|
|
37
|
-
- The writing time should be January 1, 2020
|
|
38
|
-
|
|
37
|
+
- The author is Ms.Hope.
|
|
38
|
+
- The writing date is January 1, 2020
|
|
39
39
|
- Category is "Guide"
|
|
40
|
-
|
|
41
40
|
- Tags are "Page Config" and "Guide"
|
|
42
41
|
|
|
43
42
|
## Page Content
|
|
44
43
|
|
|
45
44
|
You are free to write your Markdown here.
|
|
46
45
|
|
|
47
|
-
::: tip
|
|
46
|
+
::: tip Assets
|
|
48
47
|
|
|
49
|
-
-
|
|
48
|
+
- You can place images besides your markdown files, but you should use **relative links** (i.e.: starting with `./`) for them.
|
|
50
49
|
|
|
51
|
-
- For
|
|
50
|
+
- For images in `.vuepress/public` directory, please use absolute links (i.e.: startingwith `/`) for them.
|
|
52
51
|
|
|
53
52
|
:::
|
|
54
53
|
|
|
@@ -60,7 +59,14 @@ The theme contains a custom badge:
|
|
|
60
59
|
|
|
61
60
|
This page should contain:
|
|
62
61
|
|
|
62
|
+
- [BreadCrumb](https://vuepress-theme-hope.github.io/v2/guide/layout/breadcrumb.html)
|
|
63
|
+
- [Title and infomation](https://vuepress-theme-hope.github.io/v2/guide/feature/page-info.html)
|
|
64
|
+
- [TOC (Table of Contents)](https://vuepress-theme-hope.github.io/v2/guide/layout/page.html#header-list)
|
|
65
|
+
- [Meta infomation including update time and contributors](https://vuepress-theme-hope.github.io/v2/guide/feature/meta.html)
|
|
66
|
+
- [Comments](https://vuepress-theme-hope.github.io/v2/guide/feature/comment.html)
|
|
67
|
+
- [Navbar](https://vuepress-theme-hope.github.io/v2/guide/layout/navbar.html)
|
|
68
|
+
- [Sidebar](https://vuepress-theme-hope.github.io/v2/guide/layout/sidebar.html)
|
|
69
|
+
- [Footer](https://vuepress-theme-hope.github.io/v2/guide/layout/footer.html)
|
|
63
70
|
- Back to top button
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- Footer
|
|
71
|
+
|
|
72
|
+
You can customize them in theme options and page frontmatter.
|
package/template/en-US/home.md
CHANGED
|
@@ -103,7 +103,7 @@ copyright: false
|
|
|
103
103
|
footer: MIT Licensed | Copyright © 2019-present Mr.Hope
|
|
104
104
|
---
|
|
105
105
|
|
|
106
|
-
This is an example of a
|
|
106
|
+
This is an example of a project homepage. You can place your main content here.
|
|
107
107
|
|
|
108
108
|
To use this layout, you need to set `home: true` in the page front matter.
|
|
109
109
|
|
|
@@ -10,7 +10,7 @@ export default hopeTheme({
|
|
|
10
10
|
url: "https://mrhope.site",
|
|
11
11
|
},
|
|
12
12
|
|
|
13
|
-
iconAssets: "
|
|
13
|
+
iconAssets: "iconfont",
|
|
14
14
|
|
|
15
15
|
logo: "/logo.svg",
|
|
16
16
|
|
|
@@ -110,24 +110,24 @@ export default hopeTheme({
|
|
|
110
110
|
// To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
|
|
111
111
|
comment: {
|
|
112
112
|
/**
|
|
113
|
-
* Using
|
|
113
|
+
* Using Giscus
|
|
114
114
|
*/
|
|
115
|
-
|
|
115
|
+
provider: "Giscus",
|
|
116
116
|
repo: "vuepress-theme-hope/giscus-discussions",
|
|
117
117
|
repoId: "R_kgDOG_Pt2A",
|
|
118
118
|
category: "Announcements",
|
|
119
119
|
categoryId: "DIC_kwDOG_Pt2M4COD69",
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
* Using
|
|
122
|
+
* Using Twikoo
|
|
123
123
|
*/
|
|
124
|
-
//
|
|
124
|
+
// provider: "Twikoo",
|
|
125
125
|
// envId: "https://twikoo.ccknbc.vercel.app",
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
128
|
* Using Waline
|
|
129
129
|
*/
|
|
130
|
-
//
|
|
130
|
+
// provider: "Waline",
|
|
131
131
|
// serverURL: "https://vuepress-theme-hope-comment.vercel.app",
|
|
132
132
|
},
|
|
133
133
|
|
package/template/i18n/README.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
+
title: Guides
|
|
2
3
|
index: false
|
|
3
4
|
icon: creative
|
|
4
5
|
category:
|
|
5
6
|
- Guide
|
|
6
7
|
---
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- [Page Config](page.md)
|
|
9
|
+
## Catalog
|
|
11
10
|
|
|
12
11
|
- [Markdown Enhance](markdown.md)
|
|
13
12
|
|
|
13
|
+
- [Page Config](page.md)
|
|
14
|
+
|
|
14
15
|
- [Function Disable](disable.md)
|
|
15
16
|
|
|
16
17
|
- [Encryption Demo](encrypt.md)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
title: Component disabled
|
|
2
|
+
title: Disabling layout and features
|
|
4
3
|
icon: config
|
|
4
|
+
order: 3
|
|
5
5
|
category:
|
|
6
6
|
- Guide
|
|
7
7
|
tag:
|
|
@@ -23,11 +23,11 @@ footer: false
|
|
|
23
23
|
backtotop: false
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
You can disable some
|
|
26
|
+
You can disable some function and layout on the page by setting the Frontmatter of the page.
|
|
27
27
|
|
|
28
28
|
<!-- more -->
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
This page is an demo that disables the following features:
|
|
31
31
|
|
|
32
32
|
- Navbar
|
|
33
33
|
- Sidebar
|