create-vuepress-theme-hope 2.0.0-beta.115 → 2.0.0-beta.117

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 CHANGED
@@ -1,13 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import{readdirSync as g,mkdirSync as P,statSync as w,createReadStream as N,createWriteStream as C,writeFileSync as u,existsSync as h,readFileSync as k}from"node:fs";import{dirname as $,resolve as i,join as v}from"node:path";import{cac as E}from"cac";import{execaCommandSync as p,execaCommand as I}from"execa";import c from"inquirer";import{fileURLToPath as _}from"node:url";import"node:https";import{createRequire as z}from"node:module";const F={简体中文:{flow:{getVersion:"获取依赖的最新版本...",createPackage:"生成 package.json...",updatePackage:"更新 package.json...",generateTemplate:"生成模板...",install:"安装依赖...",devServer:`启动开发服务器...
2
+ import{existsSync as m,readFileSync as w,writeFileSync as u,readdirSync as h,mkdirSync as P,statSync as k,createReadStream as C,createWriteStream as N}from"node:fs";import{resolve as i,join as v,dirname as $}from"node:path";import{cac as E}from"cac";import{execaCommandSync as p,execaCommand as I}from"execa";import c from"inquirer";import{fileURLToPath as z}from"node:url";import"node:https";import{createRequire as F}from"node:module";const _={简体中文:{flow:{getVersion:"获取依赖的最新版本...",createPackage:"生成 package.json...",updatePackage:"更新 package.json...",generateTemplate:"生成模板...",install:"安装依赖...",devServer:`启动开发服务器...
3
3
  启动成功后,请在浏览器输入给出的开发服务器地址(默认为 'localhost:8080')`},question:{packageManager:"选择包管理器",i18n:"项目需要用到多语言么?",git:"是否初始化 Git 仓库?",workflow:"是否需要一个自动部署文档到 GitHub Pages 的工作流?",preset:"你想要创建什么类型的项目?",devServer:"是否想要现在启动 Demo 查看?",name:"设置应用名称",version:"设置应用版本号",description:"设置应用描述",license:"设置协议"},hint:{install:`这可能需要数分钟,请耐心等待.
4
4
  我们无法正确输出子进程的进度条,所以进程可能会看似未响应`,finish:"模板已成功生成!",devServer:e=>`提示: 请使用 "${e} run docs:dev" 命令启动开发服务器`},error:{name:"应用名称应只包含小写字母、数字和连接线 (-)",version:"此版本无效,版本号应为 'x.x.x'",preset:"预设 (--preset) 仅支持 doc 或 blog",outputDirMissing:e=>`"[dir]" 的方括号表示此处为一个参数,你应该替换为自己想使用的文件夹名称,如 "my-blog", "project-docs" 等!
5
5
  例如: "${e} init vuepress-theme-hope@next project-docs"`,updateDirMissing:e=>`"[dir]" 的方括号表示此处为一个参数,你应该替换为自己想使用的文件夹名称,如 "src", "docs" 等!
6
- 例如: "${e} init vuepress-theme-hope@next docs"`,dirNotEmpty:e=>`目标文件夹 "${e}" 不为空,请选择一个空文件夹或者手动删除文件夹中的文件`}},"english (US)":{flow:{getVersion:"Getting lastest version of deps...",createPackage:"Generating package.json...",updatePackage:"Updating package.json...",generateTemplate:"Generating Template...",install:"Installing Deps...",devServer:`Staring dev server...
6
+ 例如: "${e} init vuepress-theme-hope@next docs"`,dirNotEmpty:e=>`目标文件夹 "${e}" 不为空,请选择一个空文件夹或者手动删除文件夹中的文件`}},"english (US)":{flow:{getVersion:"Getting latest version of deps...",createPackage:"Generating package.json...",updatePackage:"Updating package.json...",generateTemplate:"Generating Template...",install:"Installing Deps...",devServer:`Staring dev server...
7
7
  After the dev server starts running, please visit the given server link ('localhost:8080' by default)`},question:{i18n:"Does the project need multiple languages?",git:"Initialize a git repository?",workflow:"Do you need a GitHub workflow to deploy docs on GitHub pages?",preset:"What type of project do you want to create?",packageManager:"Choose package manager",devServer:"Would you like to preview template now?",name:"Your project name",version:"Your project version",description:"Your project description",license:"Your project license"},hint:{install:`This may take a few minutes, please be patient.
8
8
  We can not correctly output progress bar from child process, so the process may look stuck.`,finish:"Successful Generated!",devServer:e=>`Hint: You should execute "${e} run docs:dev" to start dev server.`},error:{name:"package name should only contain lowercase characters, numbers and dash",version:"This version is not a valid one. Version should be like 'x.x.x'",preset:'preset (--preset) only support "doc" or "blog"',outputDirMissing:e=>`The brackets in "[dir]" means it is an argument, you should replace it with folder name you want to use! E.g.: "my-blog", "project-docs"
9
9
  For example: "${e} init vuepress-theme-hope@next project-docs"`,updateDirMissing:e=>`The brackets in "[dir]" means it is an argument, you should replace it with folder name you want to use! E.g.: "src", "docs"
10
- For example: "${e} init vuepress-theme-hope@next docs"`,dirNotEmpty:e=>`Target folder "${e}" is not empty, please choose an empty folder or delete files in it.`}}},O=async()=>{const{language:e}=await c.prompt([{name:"language",type:"list",message:"Select a language to display / 选择显示语言",choices:["english (US)","简体中文"]}]);return{lang:e,message:F[e]}},y=(e,...r)=>{if(r.length===0)return e;const t=r.shift()||{};return Object.keys(t).forEach(s=>{typeof e[s]=="object"&&!Array.isArray(e[s])&&typeof t[s]=="object"&&!Array.isArray(t[s])?y(e[s],t[s]):typeof t[s]=="object"?Array.isArray(t[s])?e[s]=[...t[s]]:e[s]={...t[s]}:e[s]=t[s]}),y(e,...r)},d=e=>{try{g(e)}catch{P(e,{recursive:!0})}},b=(e,r)=>{const t=$(r);d(t);const s=N(e),o=C(r);s.pipe(o)},j=(e,r)=>{d(r),g(e,{withFileTypes:!0}).forEach(t=>{t.isFile()?b(`${e}/${t.name}`,`${r}/${t.name}`):t.isDirectory()&&j(`${e}/${t.name}`,`${r}/${t.name}`)})},x=(e,r)=>{w(e).isDirectory()?j(e,r):w(e).isFile()&&b(e,r)},W=()=>{try{return p("git log"),!0}catch{return!1}},H=()=>{try{return p("git log"),!0}catch{return!1}},J=()=>{try{return p("pnpm --version",{stdio:"ignore"}).exitCode===0}catch{return!1}},R=()=>{try{return p("yarn --version",{stdio:"ignore"}).exitCode===0}catch{return!1}},f=["npm"];R()&&f.push("yarn"),J()&&f.push("pnpm");const Y=async e=>(await c.prompt([{name:"packageManager",type:"list",message:e,choices:f}])).packageManager,U=_(import.meta.url),S=$(U),V=(e,r,t)=>`
10
+ For example: "${e} init vuepress-theme-hope@next docs"`,dirNotEmpty:e=>`Target folder "${e}" is not empty, please choose an empty folder or delete files in it.`}}},O=async()=>{const{language:e}=await c.prompt([{name:"language",type:"list",message:"Select a language to display / 选择显示语言",choices:["english (US)","简体中文"]}]);return{lang:e,message:_[e]}},W=e=>`
11
+ node_modules/
12
+ ${e}/.vuepress/.cache/
13
+ ${e}/.vuepress/.temp/
14
+ ${e}/.vuepress/dist/
15
+ `,b=e=>{const r=i(process.cwd(),".gitignore"),t=m(r)?w(r,{encoding:"utf-8"}):"";u(r,`${t}${W(e)}`,{encoding:"utf-8"})},H=(e,r,t)=>`
11
16
  name: ${t==="简体中文"?"部署文档":"Deploy Docs"}
12
17
 
13
18
  on:
@@ -27,8 +32,7 @@ jobs:
27
32
  # ${t==="简体中文"?"如果你文档需要 Git 子模块,取消注释下一行":"if your docs needs submodules, uncomment the following line"}
28
33
  # submodules: true
29
34
 
30
- ${e==="pnpm"?`
31
- - name: ${t==="简体中文"?"安装 pnpm":"Install pnpm"}
35
+ ${e==="pnpm"?` - name: ${t==="简体中文"?"安装 pnpm":"Install pnpm"}
32
36
  uses: pnpm/action-setup@v2
33
37
  with:
34
38
  version: 7
@@ -41,9 +45,9 @@ ${e==="pnpm"?`
41
45
  node-version: 18
42
46
  cache: ${e}
43
47
 
44
- - name: ${t==="简体中文"?"安装依赖":"Install Deps"}
45
- run: ${e==="npm"?"npm install":`${e} install --frozen-lockfile`}
46
-
48
+ ${e!=="pnpm"?` - name: ${t==="简体中文"?"安装依赖":"Install Deps"}
49
+ run: ${e==="npm"?"npm ci":`${e} install --frozen-lockfile`}
50
+ `:""}
47
51
  - name: ${t==="简体中文"?"构建文档":"Build Docs"}
48
52
  env:
49
53
  NODE_OPTIONS: --max_old_space_size=8192
@@ -57,12 +61,6 @@ ${e==="pnpm"?`
57
61
  # ${t==="简体中文"?"这是文档部署到的分支名称":"This is the branch where the docs are deployed to"}
58
62
  branch: gh-pages
59
63
  folder: ${v(r,".vuepress/dist").replace(/\\/g,"/")}
60
-
61
- `,L=e=>`
62
- node_modules/
63
- ${e}/.vuepress/.cache/
64
- ${e}/.vuepress/.temp/
65
- ${e}/.vuepress/dist/
66
- `,D=e=>{const r=i(process.cwd(),".gitignore"),t=h(r)?k(r,{encoding:"utf-8"}):"";u(r,`${t}${L(e)}`,{encoding:"utf-8"})},M=async(e,{packageManager:r,lang:t,message:s,preset:o})=>{const{workflow:n}=await c.prompt([{name:"workflow",type:"confirm",message:s.question.workflow,default:!0}]);if(o||(o=(await c.prompt([{name:"preset",type:"list",message:s.question.preset,choices:["blog","docs"]}])).preset),console.log(s.flow.generateTemplate),x(i(S,"../template/public"),i(process.cwd(),e,"./.vuepress/public")),x(i(S,"../template",o),i(process.cwd(),e)),n){const a=i(process.cwd(),".github/workflows");d(a),u(i(a,"deploy-docs.yml"),V(r,e,t),{encoding:"utf-8"})}if(W())D(e);else if(H()){const{git:a}=await c.prompt([{name:"git",type:"confirm",message:s.question.git,default:!0}]);a&&(p("git init"),D(e))}},T=z(import.meta.url)("create-vuepress-theme-hope/package.json").version,B=e=>({"docs:build":`vuepress build ${e}`,"docs:clean-dev":`vuepress dev ${e} --clean-cache`,"docs:dev":`vuepress dev ${e}`}),q=async(e,r,t=process.cwd())=>{const s=i(t,"package.json"),o=B(r),n={"@vuepress/client":"2.0.0-beta.53",vue:"^3.2.41",vuepress:"2.0.0-beta.53","vuepress-theme-hope":T};if(h(s)){console.log(e.flow.updatePackage);const a=JSON.parse(k(s,{encoding:"utf-8"}));y(a,{scripts:o,devDependencies:n}),u(s,`${JSON.stringify(a,null,2)}
67
- `,{encoding:"utf-8"})}else{console.log(e.flow.createPackage);const a={...await c.prompt([{name:"name",type:"input",message:e.question.name,default:"vuepress-theme-hope-template",validate:m=>/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u.exec(m)?!0:e.error.name},{name:"version",type:"input",message:e.question.version,default:"2.0.0",validate:m=>/^[0-9]+\.[0-9]+\.(?:[0=9]+|[0-9]+-[a-z]+\.[0-9])$/u.exec(m)?!0:e.error.version},{name:"description",type:"input",message:e.question.description,default:"A project of vuepress-theme-hope"},{name:"license",type:"input",message:e.question.license,default:"MIT"}]),type:"module",scripts:o,devDependencies:n};u(s,`${JSON.stringify(a,null,2)}
68
- `,{encoding:"utf-8"})}},K="https://registry.npmmirror.com/",Q=e=>p(`${e} config get registry`).stdout,X=async(e,r)=>{const t=Q(e);if(r==="简体中文"){const{registry:s}=await c.prompt([{name:"registry",type:"list",message:"选择你想使用的源",choices:["国内镜像源","当前源"]}]);return s==="国内镜像源"?K:t}return t},G=async(e,r)=>{if(!e)return l.outputHelp();const{lang:t,message:s}=await O();if(r&&!["docs","blog"].includes(r))return console.log(s.error.preset);const o=await Y(s.question.packageManager);if(e.startsWith("[")&&e.endsWith("]"))return console.log(s.error.updateDirMissing(o));const n=i(process.cwd(),e);return h(n)&&g(n).length?console.error(s.error.dirNotEmpty(e)):(d(n),{lang:t,message:s,packageManager:o})},A=async({cwd:e=process.cwd(),lang:r,message:t,packageManager:s})=>{const o=s==="pnpm"?"":await X(s,r);console.log(t.flow.install),console.warn(t.hint.install),p(`${s} install ${o?`--registry ${o}`:""}`,{cwd:e,stdout:"inherit"}),console.log(t.hint.finish);const{choice:n}=await c.prompt([{name:"choice",type:"confirm",message:t.question.devServer,default:!0}]);n?(console.log(t.flow.devServer),await I(`${s} run docs:dev`,{cwd:e,stdout:"inherit"})):console.log(t.hint.devServer(s))},l=E("vuepress-theme-hope");l.command("[dir]","Generate a new vuepress-theme-hope project").option("-p, --preset <preset>","Choose preset to use").usage("pnpm create vuepress-theme-hope@next [dir] / npm init vuepress-theme-hope@next [dir]").example("docs").action(async(e,{preset:r=null})=>{const t=i(process.cwd(),e),s=await G(e,r);if(s){const{lang:o,message:n,packageManager:a}=s;await q(n,"src",e),await M(v(e,"src"),{packageManager:a,lang:o,message:n,preset:r}),await A({cwd:t,lang:o,message:n,packageManager:a})}}),l.command("inject [dir]","Add vuepress template to dir").option("-p, --preset <preset>","Choose preset to use").usage("pnpm create vuepress-theme-hope@next inject [dir] / npm init vuepress-theme-hope@next inject [dir]").example("docs").action(async(e,{preset:r=null})=>{const t=await G(e,r);if(t){const{lang:s,message:o,packageManager:n}=t;await q(o,e),await M(e,{packageManager:n,lang:s,message:o,preset:r}),await A({message:o,lang:s,packageManager:n})}}),l.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]"},{title:"pnpm create vuepress-theme-hope@next inject [dir] / npm init vuepress-theme-hope@next inject [dir]",body:"Add vuepress-theme-hope template in [dir] under currect project"}]),l.version(T),l.parse();
64
+ `,y=(e,...r)=>{if(r.length===0)return e;const t=r.shift()||{};return Object.keys(t).forEach(s=>{typeof e[s]=="object"&&!Array.isArray(e[s])&&typeof t[s]=="object"&&!Array.isArray(t[s])?y(e[s],t[s]):typeof t[s]=="object"?Array.isArray(t[s])?e[s]=[...t[s]]:e[s]={...t[s]}:e[s]=t[s]}),y(e,...r)},g=e=>{try{h(e)}catch{P(e,{recursive:!0})}},j=(e,r)=>{const t=$(r);g(t);const s=C(e),o=N(r);s.pipe(o)},x=(e,r)=>{g(r),h(e,{withFileTypes:!0}).forEach(t=>{t.isFile()?j(`${e}/${t.name}`,`${r}/${t.name}`):t.isDirectory()&&x(`${e}/${t.name}`,`${r}/${t.name}`)})},S=(e,r)=>{k(e).isDirectory()?x(e,r):k(e).isFile()&&j(e,r)},J=()=>{try{return p("git log"),!0}catch{return!1}},R=()=>{try{return p("git log"),!0}catch{return!1}},Y=()=>{try{return p("pnpm --version",{stdio:"ignore"}).exitCode===0}catch{return!1}},U=()=>{try{return p("yarn --version",{stdio:"ignore"}).exitCode===0}catch{return!1}},f=["npm"];U()&&f.push("yarn"),Y()&&f.push("pnpm");const V=async e=>(await c.prompt([{name:"packageManager",type:"list",message:e,choices:f}])).packageManager,L=z(import.meta.url),D=$(L),M=async(e,{packageManager:r,lang:t,message:s,preset:o})=>{const{workflow:n}=await c.prompt([{name:"workflow",type:"confirm",message:s.question.workflow,default:!0}]);if(o||(o=(await c.prompt([{name:"preset",type:"list",message:s.question.preset,choices:["blog","docs"]}])).preset),console.log(s.flow.generateTemplate),S(i(D,"../template/public"),i(process.cwd(),e,"./.vuepress/public")),S(i(D,"../template",o),i(process.cwd(),e)),n){const a=i(process.cwd(),".github/workflows");g(a),u(i(a,"deploy-docs.yml"),H(r,e,t),{encoding:"utf-8"})}if(J())b(e);else if(R()){const{git:a}=await c.prompt([{name:"git",type:"confirm",message:s.question.git,default:!0}]);a&&(p("git init"),b(e))}},T=F(import.meta.url)("create-vuepress-theme-hope/package.json").version,B=e=>({"docs:build":`vuepress build ${e}`,"docs:clean-dev":`vuepress dev ${e} --clean-cache`,"docs:dev":`vuepress dev ${e}`}),G=async(e,r,t=process.cwd())=>{const s=i(t,"package.json"),o=B(r),n={"@vuepress/client":"2.0.0-beta.53",vue:"^3.2.41",vuepress:"2.0.0-beta.53","vuepress-theme-hope":T};if(m(s)){console.log(e.flow.updatePackage);const a=JSON.parse(w(s,{encoding:"utf-8"}));y(a,{scripts:o,devDependencies:n}),u(s,`${JSON.stringify(a,null,2)}
65
+ `,{encoding:"utf-8"})}else{console.log(e.flow.createPackage);const a={...await c.prompt([{name:"name",type:"input",message:e.question.name,default:"vuepress-theme-hope-template",validate:d=>/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u.exec(d)?!0:e.error.name},{name:"version",type:"input",message:e.question.version,default:"2.0.0",validate:d=>/^[0-9]+\.[0-9]+\.(?:[0=9]+|[0-9]+-[a-z]+\.[0-9])$/u.exec(d)?!0:e.error.version},{name:"description",type:"input",message:e.question.description,default:"A project of vuepress-theme-hope"},{name:"license",type:"input",message:e.question.license,default:"MIT"}]),type:"module",scripts:o,devDependencies:n};u(s,`${JSON.stringify(a,null,2)}
66
+ `,{encoding:"utf-8"})}},K="https://registry.npmmirror.com/",Q=e=>p(`${e} config get registry`).stdout,X=async(e,r)=>{const t=Q(e);if(r==="简体中文"){const{registry:s}=await c.prompt([{name:"registry",type:"list",message:"选择你想使用的源",choices:["国内镜像源","当前源"]}]);return s==="国内镜像源"?K:t}return t},q=async(e,r)=>{if(!e)return l.outputHelp();const{lang:t,message:s}=await O();if(r&&!["docs","blog"].includes(r))return console.log(s.error.preset);const o=await V(s.question.packageManager);if(e.startsWith("[")&&e.endsWith("]"))return console.log(s.error.updateDirMissing(o));const n=i(process.cwd(),e);return m(n)&&h(n).length?console.error(s.error.dirNotEmpty(e)):(g(n),{lang:t,message:s,packageManager:o})},A=async({cwd:e=process.cwd(),lang:r,message:t,packageManager:s})=>{const o=s==="pnpm"?"":await X(s,r);console.log(t.flow.install),console.warn(t.hint.install),p(`${s} install ${o?`--registry ${o}`:""}`,{cwd:e,stdout:"inherit"}),console.log(t.hint.finish);const{choice:n}=await c.prompt([{name:"choice",type:"confirm",message:t.question.devServer,default:!0}]);n?(console.log(t.flow.devServer),await I(`${s} run docs:dev`,{cwd:e,stdout:"inherit"})):console.log(t.hint.devServer(s))},l=E("vuepress-theme-hope");l.command("[dir]","Generate a new vuepress-theme-hope project").option("-p, --preset <preset>","Choose preset to use").usage("pnpm create vuepress-theme-hope@next [dir] / npm init vuepress-theme-hope@next [dir]").example("docs").action(async(e,{preset:r=null})=>{const t=i(process.cwd(),e),s=await q(e,r);if(s){const{lang:o,message:n,packageManager:a}=s;await G(n,"src",e),await M(v(e,"src"),{packageManager:a,lang:o,message:n,preset:r}),await A({cwd:t,lang:o,message:n,packageManager:a})}}),l.command("inject [dir]","Add vuepress template to dir").option("-p, --preset <preset>","Choose preset to use").usage("pnpm create vuepress-theme-hope@next inject [dir] / npm init vuepress-theme-hope@next inject [dir]").example("docs").action(async(e,{preset:r=null})=>{const t=await q(e,r);if(t){const{lang:s,message:o,packageManager:n}=t;await G(o,e),await M(e,{packageManager:n,lang:s,message:o,preset:r}),await A({message:o,lang:s,packageManager:n})}}),l.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]"},{title:"pnpm create vuepress-theme-hope@next inject [dir] / npm init vuepress-theme-hope@next inject [dir]",body:"Add vuepress-theme-hope template in [dir] under current project"}]),l.version(T),l.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vuepress-theme-hope",
3
- "version": "2.0.0-beta.115",
3
+ "version": "2.0.0-beta.117",
4
4
  "description": "Create vuepress-theme-hope demo project helper",
5
5
  "keywords": [
6
6
  "create",
@@ -32,7 +32,6 @@
32
32
  "create-vuepress-theme-hope": "./lib/index.js"
33
33
  },
34
34
  "files": [
35
- "lib",
36
35
  "template"
37
36
  ],
38
37
  "dependencies": {
@@ -39,7 +39,7 @@ export const enNavbar = navbar([
39
39
  ],
40
40
  },
41
41
  { text: "Cherry", icon: "edit", link: "cherry" },
42
- { text: "Dragonfruit", icon: "edit", link: "dragonfruit" },
42
+ { text: "Dragon Fruit", icon: "edit", link: "dragonfruit" },
43
43
  "tomato",
44
44
  "strawberry",
45
45
  ],
@@ -1,2 +1,2 @@
1
1
  // you can change config here
2
- $code-lang: "css" "html" "js" "ts" "vue";
2
+ $content-class: ".theme-content";
@@ -120,7 +120,7 @@ export default hopeTheme({
120
120
  autoExcerpt: true,
121
121
  },
122
122
 
123
- // If you don't need comment feature, you can remove following option
123
+ // If you don’t need comment feature, you can remove following option
124
124
  // The following config is for demo ONLY, if you need comment feature, please generate and use your own config, see comment plugin documentation for details.
125
125
  // To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
126
126
  comment: {
@@ -146,7 +146,7 @@ export default hopeTheme({
146
146
  // serverURL: "https://vuepress-theme-hope-comment.vercel.app",
147
147
  },
148
148
 
149
- // Disable features you don't want here
149
+ // Disable features you don’t want here
150
150
  mdEnhance: {
151
151
  align: true,
152
152
  attrs: true,
@@ -157,10 +157,11 @@ export default hopeTheme({
157
157
  echarts: true,
158
158
  flowchart: true,
159
159
  gfm: true,
160
+ imageLazyload: true,
161
+ imageTitle: true,
160
162
  imageSize: true,
161
163
  include: true,
162
164
  katex: true,
163
- lazyLoad: true,
164
165
  mark: true,
165
166
  mermaid: true,
166
167
  playground: {
@@ -171,13 +172,13 @@ export default hopeTheme({
171
172
  },
172
173
  stylize: [
173
174
  {
174
- matcher: "Recommanded",
175
+ matcher: "Recommended",
175
176
  replacer: ({ tag }) => {
176
177
  if (tag === "em")
177
178
  return {
178
179
  tag: "Badge",
179
180
  attrs: { type: "tip" },
180
- content: "Recommanded",
181
+ content: "Recommended",
181
182
  };
182
183
  },
183
184
  },
@@ -185,7 +186,7 @@ export default hopeTheme({
185
186
  sub: true,
186
187
  sup: true,
187
188
  tabs: true,
188
- vpre: true,
189
+ vPre: true,
189
190
  vuePlayground: true,
190
191
  },
191
192
 
@@ -367,7 +367,7 @@ span {
367
367
 
368
368
  #### Stylize
369
369
 
370
- Donate Mr.Hope a cup of coffee. _Recommanded_
370
+ Donate Mr.Hope a cup of coffee. _Recommended_
371
371
 
372
372
  - [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/stylize.html)
373
373
 
@@ -47,7 +47,7 @@ You are free to write your Markdown here.
47
47
 
48
48
  - You can place images besides your Markdown files, but you should use **relative links** (i.e.: starting with `./`) for them.
49
49
 
50
- - For images in `.vuepress/public` directory, please use absolute links (i.e.: startingwith `/`) for them.
50
+ - For images in `.vuepress/public` directory, please use absolute links (i.e.: starting with `/`) for them.
51
51
 
52
52
  :::
53
53
 
@@ -60,9 +60,9 @@ The theme contains a custom badge:
60
60
  This page should contain:
61
61
 
62
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)
63
+ - [Title and information](https://vuepress-theme-hope.github.io/v2/guide/feature/page-info.html)
64
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)
65
+ - [Meta information including update time and contributors](https://vuepress-theme-hope.github.io/v2/guide/feature/meta.html)
66
66
  - [Comments](https://vuepress-theme-hope.github.io/v2/guide/feature/comment.html)
67
67
  - [Navbar](https://vuepress-theme-hope.github.io/v2/guide/layout/navbar.html)
68
68
  - [Sidebar](https://vuepress-theme-hope.github.io/v2/guide/layout/sidebar.html)
@@ -4,4 +4,4 @@ icon: info
4
4
 
5
5
  # Intro Page
6
6
 
7
- Place your introducation and profile here.
7
+ Place your introduction and profile here.
@@ -2,14 +2,14 @@
2
2
  icon: edit
3
3
  date: 2022-01-10
4
4
  category:
5
- - Dragonfruit
5
+ - Dragon Fruit
6
6
  - Fruit
7
7
  tag:
8
8
  - red
9
9
  - big
10
10
  ---
11
11
 
12
- # Dragonfruit
12
+ # Dragon Fruit
13
13
 
14
14
  ## Heading 2
15
15
 
@@ -18,7 +18,7 @@ A simple slide demo and useful hints.
18
18
 
19
19
  <!-- .element: class="r-fit-text" -->
20
20
 
21
- > By Mr.Hope. Please scroll mousewheel down to the next slide
21
+ > By Mr.Hope. Please scroll mouse wheel down to the next slide
22
22
 
23
23
  ---
24
24
 
@@ -42,7 +42,7 @@ Use `---` to mark horizontal slides
42
42
 
43
43
  <!-- .element: class="fragment fade-in" -->
44
44
 
45
- Use `--` to sperate vertical slides in a horizontal slide.
45
+ Use `--` to separate vertical slides in a horizontal slide.
46
46
 
47
47
  <!-- .element: class="fragment fade-in" -->
48
48
 
@@ -78,7 +78,7 @@ You can use all kinds of markup in slides.
78
78
 
79
79
  Headings will transform to UPPERCASE by default.
80
80
 
81
- Here is paragraph with some **bold**, _italic_, ~~strikethrough~~ text and a [link](https://mrhope.site), and it can auto break itself so you don’t need to worry the length.
81
+ Here is paragraph with some **bold**, _italic_, ~~strike-through~~ text and a [link](https://mrhope.site), and it can auto break itself so you don’t need to worry the length.
82
82
 
83
83
  --
84
84
 
@@ -174,7 +174,7 @@ You can use all kinds of markup in slides.
174
174
 
175
175
  ### Background
176
176
 
177
- Cutom background by adding `data-background` attribute to slide.
177
+ Custom background by adding `data-background` attribute to slide.
178
178
 
179
179
  ---
180
180
 
@@ -277,7 +277,7 @@ Add `fragment` and animation class to element.
277
277
 
278
278
  ## Fragment
279
279
 
280
- ### Mutiple fragments
280
+ ### Multiple fragments
281
281
 
282
282
  Multiple fragments can be applied to the same element sequentially by wrapping it
283
283
 
@@ -347,7 +347,7 @@ span {
347
347
 
348
348
  #### 样式化
349
349
 
350
- 向 Mr.Hope 捐赠一杯咖啡。 _Recommanded_
350
+ 向 Mr.Hope 捐赠一杯咖啡。 _Recommended_
351
351
 
352
352
  - [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/stylize.html)
353
353
 
@@ -1,2 +1,2 @@
1
1
  // you can change config here
2
- $code-lang: "css" "html" "js" "ts" "vue";
2
+ $content-class: ".theme-content";
@@ -66,7 +66,7 @@ export default hopeTheme({
66
66
  },
67
67
 
68
68
  plugins: {
69
- // If you don't need comment feature, you can remove following option
69
+ // If you don’t need comment feature, you can remove following option
70
70
  // The following config is for demo ONLY, if you need comment feature, please generate and use your own config, see comment plugin documentation for details.
71
71
  // To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
72
72
  comment: {
@@ -92,7 +92,7 @@ export default hopeTheme({
92
92
  serverURL: "https://vuepress-theme-hope-comment.vercel.app",
93
93
  },
94
94
 
95
- // Disable features you don't want here
95
+ // Disable features you don’t want here
96
96
  mdEnhance: {
97
97
  align: true,
98
98
  attrs: true,
@@ -103,10 +103,11 @@ export default hopeTheme({
103
103
  echarts: true,
104
104
  flowchart: true,
105
105
  gfm: true,
106
+ imageLazyload: true,
107
+ imageTitle: true,
106
108
  imageSize: true,
107
109
  include: true,
108
110
  katex: true,
109
- lazyLoad: true,
110
111
  mark: true,
111
112
  mermaid: true,
112
113
  playground: {
@@ -117,13 +118,13 @@ export default hopeTheme({
117
118
  },
118
119
  stylize: [
119
120
  {
120
- matcher: "Recommanded",
121
+ matcher: "Recommended",
121
122
  replacer: ({ tag }) => {
122
123
  if (tag === "em")
123
124
  return {
124
125
  tag: "Badge",
125
126
  attrs: { type: "tip" },
126
- content: "Recommanded",
127
+ content: "Recommended",
127
128
  };
128
129
  },
129
130
  },
@@ -131,7 +132,7 @@ export default hopeTheme({
131
132
  sub: true,
132
133
  sup: true,
133
134
  tabs: true,
134
- vpre: true,
135
+ vPre: true,
135
136
  vuePlayground: true,
136
137
  },
137
138
 
@@ -367,7 +367,7 @@ span {
367
367
 
368
368
  #### Stylize
369
369
 
370
- Donate Mr.Hope a cup of coffee. _Recommanded_
370
+ Donate Mr.Hope a cup of coffee. _Recommended_
371
371
 
372
372
  - [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/stylize.html)
373
373
 
@@ -47,7 +47,7 @@ You are free to write your Markdown here.
47
47
 
48
48
  - You can place images besides your Markdown files, but you should use **relative links** (i.e.: starting with `./`) for them.
49
49
 
50
- - For images in `.vuepress/public` directory, please use absolute links (i.e.: startingwith `/`) for them.
50
+ - For images in `.vuepress/public` directory, please use absolute links (i.e.: starting with `/`) for them.
51
51
 
52
52
  :::
53
53
 
@@ -60,9 +60,9 @@ The theme contains a custom badge:
60
60
  This page should contain:
61
61
 
62
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)
63
+ - [Title and information](https://vuepress-theme-hope.github.io/v2/guide/feature/page-info.html)
64
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)
65
+ - [Meta information including update time and contributors](https://vuepress-theme-hope.github.io/v2/guide/feature/meta.html)
66
66
  - [Comments](https://vuepress-theme-hope.github.io/v2/guide/feature/comment.html)
67
67
  - [Navbar](https://vuepress-theme-hope.github.io/v2/guide/layout/navbar.html)
68
68
  - [Sidebar](https://vuepress-theme-hope.github.io/v2/guide/layout/sidebar.html)
@@ -18,7 +18,7 @@ A simple slide demo and useful hints.
18
18
 
19
19
  <!-- .element: class="r-fit-text" -->
20
20
 
21
- > By Mr.Hope. Please scroll mousewheel down to the next slide
21
+ > By Mr.Hope. Please scroll mouse wheel down to the next slide
22
22
 
23
23
  ---
24
24
 
@@ -42,7 +42,7 @@ Use `---` to mark horizontal slides
42
42
 
43
43
  <!-- .element: class="fragment fade-in" -->
44
44
 
45
- Use `--` to sperate vertical slides in a horizontal slide.
45
+ Use `--` to separate vertical slides in a horizontal slide.
46
46
 
47
47
  <!-- .element: class="fragment fade-in" -->
48
48
 
@@ -78,7 +78,7 @@ You can use all kinds of markup in slides.
78
78
 
79
79
  Headings will transform to UPPERCASE by default.
80
80
 
81
- Here is paragraph with some **bold**, _italic_, ~~strikethrough~~ text and a [link](https://mrhope.site), and it can auto break itself so you don’t need to worry the length.
81
+ Here is paragraph with some **bold**, _italic_, ~~strike-through~~ text and a [link](https://mrhope.site), and it can auto break itself so you don’t need to worry the length.
82
82
 
83
83
  --
84
84
 
@@ -174,7 +174,7 @@ You can use all kinds of markup in slides.
174
174
 
175
175
  ### Background
176
176
 
177
- Cutom background by adding `data-background` attribute to slide.
177
+ Custom background by adding `data-background` attribute to slide.
178
178
 
179
179
  ---
180
180
 
@@ -277,7 +277,7 @@ Add `fragment` and animation class to element.
277
277
 
278
278
  ## Fragment
279
279
 
280
- ### Mutiple fragments
280
+ ### Multiple fragments
281
281
 
282
282
  Multiple fragments can be applied to the same element sequentially by wrapping it
283
283
 
@@ -347,7 +347,7 @@ span {
347
347
 
348
348
  #### 样式化
349
349
 
350
- 向 Mr.Hope 捐赠一杯咖啡。 _Recommanded_
350
+ 向 Mr.Hope 捐赠一杯咖啡。 _Recommended_
351
351
 
352
352
  - [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/stylize.html)
353
353