create-vuepress-theme-hope 2.0.0-beta.100 → 2.0.0-beta.102
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 +65 -1
- package/package.json +1 -1
- package/template/{i18n → blog}/.vuepress/config.ts +8 -4
- package/template/blog/.vuepress/navbar/en.ts +52 -0
- package/template/{i18n → blog}/.vuepress/navbar/index.ts +0 -0
- package/template/blog/.vuepress/navbar/zh.ts +52 -0
- package/template/blog/.vuepress/sidebar/en.ts +22 -0
- package/template/{i18n → blog}/.vuepress/sidebar/index.ts +0 -0
- package/template/blog/.vuepress/sidebar/zh.ts +22 -0
- package/template/blog/.vuepress/styles/config.scss +2 -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 +252 -0
- package/template/{en-US → blog}/README.md +0 -0
- package/template/{en-US/guide → blog/demo}/README.md +0 -0
- package/template/{en-US/guide → blog/demo}/disable.md +0 -0
- package/template/{en-US/guide → blog/demo}/encrypt.md +0 -0
- package/template/{en-US/guide → blog/demo}/markdown.md +0 -0
- package/template/{i18n/guide → blog/demo}/page.md +1 -1
- package/template/{en-US → blog}/intro.md +0 -0
- package/template/{i18n/posts/article/article1.md → blog/posts/apple/1.md} +5 -4
- package/template/{i18n/posts/article/article2.md → blog/posts/apple/2.md} +9 -4
- package/template/{en-US/posts/article/article3.md → blog/posts/apple/3.md} +6 -5
- package/template/{en-US/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/{en-US/posts/article/article7.md → blog/posts/banana/3.md} +5 -5
- package/template/{en-US/posts/article/article8.md → blog/posts/banana/4.md} +5 -5
- package/template/{en-US/posts/article9.md → blog/posts/cherry.md} +5 -5
- package/template/{en-US/posts/article10.md → blog/posts/dragonfruit.md} +5 -5
- package/template/{en-US/posts/article11.md → blog/posts/strawberry.md} +5 -5
- package/template/{en-US/posts/article12.md → blog/posts/tomato.md} +5 -5
- package/template/{en-US → blog}/slides.md +0 -0
- package/template/{i18n → blog}/zh/README.md +0 -0
- package/template/{i18n/zh/guide → blog/zh/demo}/README.md +0 -0
- package/template/{i18n/zh/guide → blog/zh/demo}/disable.md +0 -0
- package/template/{i18n/zh/guide → blog/zh/demo}/encrypt.md +0 -0
- package/template/{i18n/zh/guide → blog/zh/demo}/markdown.md +0 -0
- package/template/{i18n/zh/guide → blog/zh/demo}/page.md +0 -0
- package/template/blog/zh/intro.md +7 -0
- package/template/{zh-CN/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} +5 -5
- package/template/{i18n → blog}/zh/slides.md +0 -0
- package/template/docs/.vuepress/config.ts +25 -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 +2 -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 +200 -0
- package/template/{i18n/home.md → docs/README.md} +4 -4
- package/template/{i18n/guide → docs/demo}/README.md +0 -0
- package/template/{i18n/guide → docs/demo}/disable.md +0 -0
- package/template/{i18n/guide → docs/demo}/encrypt.md +0 -0
- package/template/{i18n/guide → docs/demo}/markdown.md +0 -0
- package/template/{en-US/guide → docs/demo}/page.md +1 -1
- 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/{i18n/slide.md → docs/slides.md} +0 -0
- package/template/{i18n/zh/home.md → docs/zh/README.md} +4 -4
- package/template/{zh-CN/guide → docs/zh/demo}/README.md +0 -0
- package/template/{zh-CN/guide → docs/zh/demo}/disable.md +0 -0
- package/template/{zh-CN/guide → docs/zh/demo}/encrypt.md +0 -0
- package/template/{zh-CN/guide → docs/zh/demo}/markdown.md +0 -0
- package/template/{zh-CN/guide → docs/zh/demo}/page.md +0 -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 → docs/zh}/slides.md +0 -0
- 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/guide-monochrome.png +0 -0
- package/template/public/assets/icon/ms-icon-144.png +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/template/en-US/.vuepress/config.ts +0 -12
- 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/theme.ts +0 -148
- package/template/en-US/home.md +0 -110
- package/template/en-US/posts/article/article1.md +0 -19
- package/template/en-US/posts/article/article2.md +0 -20
- package/template/i18n/.vuepress/navbar/en.ts +0 -52
- 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/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/theme.ts +0 -176
- package/template/i18n/README.md +0 -48
- package/template/i18n/intro.md +0 -7
- package/template/i18n/posts/article/article3.md +0 -20
- package/template/i18n/posts/article/article4.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/article/article7.md +0 -20
- package/template/i18n/posts/article/article8.md +0 -20
- package/template/i18n/posts/article10.md +0 -20
- package/template/i18n/posts/article11.md +0 -20
- package/template/i18n/posts/article12.md +0 -21
- package/template/i18n/posts/article9.md +0 -20
- package/template/i18n/zh/posts/article/article1.md +0 -19
- 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 -12
- 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/theme.ts +0 -148
- package/template/zh-CN/README.md +0 -48
- package/template/zh-CN/home.md +0 -109
- 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/lib/index.js
CHANGED
|
@@ -1,2 +1,66 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{readdirSync as m,mkdirSync as b,statSync as E,createReadStream as S,createWriteStream as x,writeFileSync as l,existsSync as d,readFileSync as v}from"node:fs";import{dirname as y,resolve as a,join as D}from"node:path";import{cac as j}from"cac";import{execaCommandSync as c,execaCommand as T}from"execa";import i from"inquirer";import{fileURLToPath as q}from"node:url";import"node:https";import{createRequire as G}from"node:module";const P={\u7B80\u4F53\u4E2D\u6587:{flow:{getVersion:"\u83B7\u53D6\u4F9D\u8D56\u7684\u6700\u65B0\u7248\u672C...",createPackage:"\u751F\u6210 package.json...",updatePackage:"\u66F4\u65B0 package.json...",generateTemplate:"\u751F\u6210\u6A21\u677F...",install:"\u5B89\u88C5\u4F9D\u8D56...",devServer:`\u542F\u52A8\u5F00\u53D1\u670D\u52A1\u5668...
|
|
3
|
+
\u542F\u52A8\u6210\u529F\u540E\uFF0C\u8BF7\u5728\u6D4F\u89C8\u5668\u8F93\u5165\u7ED9\u51FA\u7684\u5F00\u53D1\u670D\u52A1\u5668\u5730\u5740(\u9ED8\u8BA4\u4E3A 'localhost:8080')`},question:{packageManager:"\u9009\u62E9\u5305\u7BA1\u7406\u5668",i18n:"\u9879\u76EE\u9700\u8981\u7528\u5230\u591A\u8BED\u8A00\u4E48?",git:"\u662F\u5426\u521D\u59CB\u5316 Git \u4ED3\u5E93?",workflow:"\u662F\u5426\u9700\u8981\u4E00\u4E2A\u81EA\u52A8\u90E8\u7F72\u6587\u6863\u5230 GitHub Pages \u7684\u5DE5\u4F5C\u6D41\uFF1F",preset:"\u4F60\u60F3\u8981\u521B\u5EFA\u4EC0\u4E48\u7C7B\u578B\u7684\u9879\u76EE\uFF1F",devServer:"\u662F\u5426\u60F3\u8981\u73B0\u5728\u542F\u52A8 Demo \u67E5\u770B?",name:"\u8BBE\u7F6E\u5E94\u7528\u540D\u79F0",version:"\u8BBE\u7F6E\u5E94\u7528\u7248\u672C\u53F7",description:"\u8BBE\u7F6E\u5E94\u7528\u63CF\u8FF0",license:"\u8BBE\u7F6E\u534F\u8BAE"},hint:{install:`\u8FD9\u53EF\u80FD\u9700\u8981\u6570\u5206\u949F\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85.
|
|
4
|
+
\u6211\u4EEC\u65E0\u6CD5\u6B63\u786E\u8F93\u51FA\u5B50\u8FDB\u7A0B\u7684\u8FDB\u5EA6\u6761\uFF0C\u6240\u4EE5\u8FDB\u7A0B\u53EF\u80FD\u4F1A\u770B\u4F3C\u672A\u54CD\u5E94`,finish:"\u6A21\u677F\u5DF2\u6210\u529F\u751F\u6210!",devServer:e=>`\u63D0\u793A: \u8BF7\u4F7F\u7528 "${e} run docs:dev" \u547D\u4EE4\u542F\u52A8\u5F00\u53D1\u670D\u52A1\u5668`},error:{name:"\u5E94\u7528\u540D\u79F0\u5E94\u53EA\u5305\u542B\u5C0F\u5199\u5B57\u6BCD\u3001\u6570\u5B57\u548C\u8FDE\u63A5\u7EBF (-)",version:"\u6B64\u7248\u672C\u65E0\u6548\uFF0C\u7248\u672C\u53F7\u5E94\u4E3A 'x.x.x'",preset:"\u9884\u8BBE (--preset) \u4EC5\u652F\u6301 doc \u6216 blog",dir:e=>`"[dir]" \u7684\u65B9\u62EC\u53F7\u8868\u793A\u6B64\u5904\u4E3A\u4E00\u4E2A\u53C2\u6570\uFF0C\u4F60\u5E94\u8BE5\u66FF\u6362\u4E3A\u81EA\u5DF1\u60F3\u4F7F\u7528\u7684\u6587\u4EF6\u5939\u540D\u79F0\uFF0C\u5982 "src", "docs" \u7B49!
|
|
5
|
+
\u4F8B\u5982: "${e} init vuepress-theme-hope@next docs"`,empty:e=>`\u76EE\u6807\u6587\u4EF6\u5939 "${e}" \u4E0D\u4E3A\u7A7A\uFF0C\u8BF7\u9009\u62E9\u4E00\u4E2A\u7A7A\u6587\u4EF6\u5939\u6216\u8005\u624B\u52A8\u5220\u9664\u6587\u4EF6\u5939\u4E2D\u7684\u6587\u4EF6`}},"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
|
+
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 lincense"},hint:{install:`This may take a few minutes, please be patient.
|
|
7
|
+
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"',dir: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"
|
|
8
|
+
For example: "${e} init vuepress-theme-hope@next docs"`,empty:e=>`Target folder "${e}" is not empty, please choose an empty folder or delete files in it.`}}},I=async()=>{const{language:e}=await i.prompt([{name:"language",type:"list",message:"Select a language to display / \u9009\u62E9\u663E\u793A\u8BED\u8A00",choices:["english (US)","\u7B80\u4F53\u4E2D\u6587"]}]);return{lang:e,message:P[e]}},F=(e,...s)=>{if(s.length===0)return e;const u=s.shift()||{};return Object.keys(u).forEach(t=>{typeof e[t]=="object"&&!Array.isArray(e[t])&&typeof u[t]=="object"&&!Array.isArray(u[t])?F(e[t],u[t]):typeof u[t]=="object"?Array.isArray(u[t])?e[t]=[...u[t]]:e[t]={...u[t]}:e[t]=u[t]}),F(e,...s)},g=e=>{try{m(e)}catch{b(e,{recursive:!0})}},f=(e,s)=>{const u=y(s);g(u);const t=S(e),r=x(s);t.pipe(r)},B=(e,s)=>{g(s),m(e,{withFileTypes:!0}).forEach(u=>{u.isFile()?f(`${e}/${u.name}`,`${s}/${u.name}`):u.isDirectory()&&B(`${e}/${u.name}`,`${s}/${u.name}`)})},w=(e,s)=>{E(e).isDirectory()?B(e,s):E(e).isFile()&&f(e,s)},M=()=>{try{return c("git log"),!0}catch{return!1}},_=()=>{try{return c("git log"),!0}catch{return!1}},z=()=>{try{return c("pnpm --version",{stdio:"ignore"}).exitCode===0}catch{return!1}},N=()=>{try{return c("yarn --version",{stdio:"ignore"}).exitCode===0}catch{return!1}},h=["npm"];N()&&h.push("yarn"),z()&&h.push("pnpm");const O=async e=>(await i.prompt([{name:"packageManager",type:"list",message:e,choices:h}])).packageManager,W=q(import.meta.url),A=y(W),H=(e,s,u)=>`
|
|
9
|
+
name: ${u==="\u7B80\u4F53\u4E2D\u6587"?"\u90E8\u7F72\u6587\u6863":"Deploy Docs"}
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
push:
|
|
13
|
+
branches:
|
|
14
|
+
# ${u==="\u7B80\u4F53\u4E2D\u6587"?"\u786E\u4FDD\u8FD9\u662F\u4F60\u6B63\u5728\u4F7F\u7528\u7684\u5206\u652F\u540D\u79F0":"make sure this is the branch you are using"}
|
|
15
|
+
- main
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
deploy-gh-pages:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v3
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
# ${u==="\u7B80\u4F53\u4E2D\u6587"?"\u5982\u679C\u4F60\u6587\u6863\u9700\u8981 Git \u5B50\u6A21\u5757\uFF0C\u53D6\u6D88\u6CE8\u91CA\u4E0B\u4E00\u884C":"if your docs needs submodules, uncomment the following line"}
|
|
26
|
+
# submodules: true
|
|
27
|
+
|
|
28
|
+
${e==="pnpm"?`
|
|
29
|
+
- name: ${u==="\u7B80\u4F53\u4E2D\u6587"?"\u5B89\u88C5 pnpm":"Install pnpm"}
|
|
30
|
+
uses: pnpm/action-setup@v2
|
|
31
|
+
with:
|
|
32
|
+
version: 7
|
|
33
|
+
run_install: true
|
|
34
|
+
`:""}
|
|
35
|
+
|
|
36
|
+
- name: ${u==="\u7B80\u4F53\u4E2D\u6587"?"\u8BBE\u7F6E Node.js":"Setup Node.js"}
|
|
37
|
+
uses: actions/setup-node@v3
|
|
38
|
+
with:
|
|
39
|
+
node-version: 16
|
|
40
|
+
cache: ${e}
|
|
41
|
+
|
|
42
|
+
- name: ${u==="\u7B80\u4F53\u4E2D\u6587"?"\u5B89\u88C5\u4F9D\u8D56":"Install Deps"}
|
|
43
|
+
run: ${e==="npm"?"npm install":`${e} install --frozen-lockfile`}
|
|
44
|
+
|
|
45
|
+
- name: ${u==="\u7B80\u4F53\u4E2D\u6587"?"\u6784\u5EFA\u6587\u6863":"Build Docs"}
|
|
46
|
+
env:
|
|
47
|
+
NODE_OPTIONS: --max_old_space_size=8192
|
|
48
|
+
run: |-
|
|
49
|
+
${e} run docs:build
|
|
50
|
+
> ${D(s,".vuepress/dist/.nojekyll").replace(/\\/g,"/")}
|
|
51
|
+
|
|
52
|
+
- name: ${u==="\u7B80\u4F53\u4E2D\u6587"?"\u90E8\u7F72\u6587\u6863":"Deploy Docs"}
|
|
53
|
+
uses: JamesIves/github-pages-deploy-action@v4
|
|
54
|
+
with:
|
|
55
|
+
# ${u==="\u7B80\u4F53\u4E2D\u6587"?"\u8FD9\u662F\u6587\u6863\u90E8\u7F72\u5230\u7684\u5206\u652F\u540D\u79F0":"This is the branch where the docs are deployed to"}
|
|
56
|
+
branch: gh-pages
|
|
57
|
+
folder: ${D(s,".vuepress/dist").replace(/\\/g,"/")}
|
|
58
|
+
|
|
59
|
+
`,J=e=>`
|
|
60
|
+
node_modules/
|
|
61
|
+
${e}/.vuepress/.cache/
|
|
62
|
+
${e}/.vuepress/.temp/
|
|
63
|
+
${e}/.vuepress/dist/
|
|
64
|
+
`,$=e=>{const s=a(process.cwd(),".gitignore"),u=d(s)?v(s,{encoding:"utf-8"}):"";l(s,`${u}${J(e)}`,{encoding:"utf-8"})},R=async(e,{packageManager:s,lang:u,message:t,preset:r})=>{const{workflow:n}=await i.prompt([{name:"workflow",type:"confirm",message:t.question.workflow,default:!0}]);if(r||(r=(await i.prompt([{name:"preset",type:"list",message:t.question.preset,choices:["blog","docs"]}])).preset),console.log(t.flow.generateTemplate),w(a(A,"../template/public"),a(process.cwd(),e,"./vuepress/public")),w(a(A,"../template",r),a(process.cwd(),e)),n){const o=a(process.cwd(),".github/workflows");g(o),l(a(o,"deploy-docs.yml"),H(s,e,u),{encoding:"utf-8"})}if(M())$(e);else if(_()){const{git:o}=await i.prompt([{name:"git",type:"confirm",message:t.question.git,default:!0}]);o&&(c("git init"),$(e))}},C=G(import.meta.url)("create-vuepress-theme-hope/package.json").version,Y=e=>({"docs:build":`vuepress build ${e}`,"docs:clean-dev":`vuepress dev ${e} --clean-cache`,"docs:dev":`vuepress dev ${e}`}),U=async(e,s)=>{const u=a(process.cwd(),"package.json"),t=Y(e),r={"@vuepress/client":"2.0.0-beta.51",vue:"^3.2.29",vuepress:"2.0.0-beta.51","vuepress-theme-hope":C};if(d(u)){console.log(s.flow.updatePackage);const n=JSON.parse(v(u,{encoding:"utf-8"}));F(n,{scripts:t,devDependencies:r}),l(u,`${JSON.stringify(n,null,2)}
|
|
65
|
+
`,{encoding:"utf-8"})}else{console.log(s.flow.createPackage);const n={...await i.prompt([{name:"name",type:"input",message:s.question.name,default:"vuepress-theme-hope-template",validate:o=>/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u.exec(o)?!0:s.error.name},{name:"version",type:"input",message:s.question.version,default:"2.0.0",validate:o=>/^[0-9]+\.[0-9]+\.(?:[0=9]+|[0-9]+-[a-z]+\.[0-9])$/u.exec(o)?!0:s.error.version},{name:"description",type:"input",message:s.question.description,default:"A project of vuepress-theme-hope"},{name:"license",type:"input",message:s.question.license,default:"MIT"}]),type:"module",scripts:t,devDependencies:r};l(u,`${JSON.stringify(n,null,2)}
|
|
66
|
+
`,{encoding:"utf-8"})}},V="https://registry.npmmirror.com/",L=e=>c(`${e} config get registry`).stdout,K=async(e,s)=>{const u=L(e);if(s==="\u7B80\u4F53\u4E2D\u6587"){const{registry:t}=await i.prompt([{name:"registry",type:"list",message:"\u9009\u62E9\u4F60\u60F3\u4F7F\u7528\u7684\u6E90",choices:["\u56FD\u5185\u955C\u50CF\u6E90","\u5F53\u524D\u6E90"]}]);return t==="\u56FD\u5185\u955C\u50CF\u6E90"?V:u}return u},p=j("vuepress-theme-hope");p.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:s=null})=>{if(!e)return p.outputHelp();const{lang:u,message:t}=await I();if(s&&!["doc","blog"].includes(s))return console.log(t.error.preset);const r=await O(t.question.packageManager);if(e.startsWith("[")&&e.endsWith("]"))return console.log(t.error.dir(r));const n=a(process.cwd(),e);if(d(n)&&m(n).length)return console.error(t.error.empty(e));await U(e,t),await R(e,{packageManager:r,lang:u,message:t,preset:s});const o=r==="pnpm"?"":await K(r,u);console.log(t.flow.install),console.warn(t.hint.install),c(`${r} install ${o?"":`--registry ${o}`}`,{stdout:"inherit"}),console.log(t.hint.finish);const{choice:k}=await i.prompt([{name:"choice",type:"confirm",message:t.question.devServer,default:!0}]);k?(console.log(t.flow.devServer),await T(`${r} run docs:dev`,{stdout:"inherit"})):console.log(t.hint.devServer(r))}),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(C),p.parse();
|
package/package.json
CHANGED
|
@@ -4,18 +4,22 @@ import theme from "./theme.js";
|
|
|
4
4
|
export default defineUserConfig({
|
|
5
5
|
base: "/",
|
|
6
6
|
|
|
7
|
+
dest: "./dist",
|
|
8
|
+
|
|
7
9
|
locales: {
|
|
8
10
|
"/": {
|
|
9
11
|
lang: "en-US",
|
|
10
|
-
title: "
|
|
11
|
-
description: "A demo for vuepress-theme-hope",
|
|
12
|
+
title: "Blog Demo",
|
|
13
|
+
description: "A blog demo for vuepress-theme-hope",
|
|
12
14
|
},
|
|
13
15
|
"/zh/": {
|
|
14
16
|
lang: "zh-CN",
|
|
15
|
-
title: "
|
|
16
|
-
description: "vuepress-theme-hope
|
|
17
|
+
title: "博客演示",
|
|
18
|
+
description: "vuepress-theme-hope 的博客演示",
|
|
17
19
|
},
|
|
18
20
|
},
|
|
19
21
|
|
|
20
22
|
theme,
|
|
23
|
+
|
|
24
|
+
shouldPrefetch: false,
|
|
21
25
|
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { navbar } from "vuepress-theme-hope";
|
|
2
|
+
|
|
3
|
+
export const enNavbar = navbar([
|
|
4
|
+
"/",
|
|
5
|
+
{ text: "Demo", icon: "discover", link: "/demo/" },
|
|
6
|
+
{
|
|
7
|
+
text: "Posts",
|
|
8
|
+
icon: "edit",
|
|
9
|
+
prefix: "/posts/",
|
|
10
|
+
children: [
|
|
11
|
+
{
|
|
12
|
+
text: "Apple",
|
|
13
|
+
icon: "edit",
|
|
14
|
+
prefix: "apple/",
|
|
15
|
+
children: [
|
|
16
|
+
{ text: "Apple1", icon: "edit", link: "1" },
|
|
17
|
+
{ text: "Apple2", icon: "edit", link: "2" },
|
|
18
|
+
"3",
|
|
19
|
+
"4",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
text: "Banana",
|
|
24
|
+
icon: "edit",
|
|
25
|
+
prefix: "banana/",
|
|
26
|
+
children: [
|
|
27
|
+
{
|
|
28
|
+
text: "Banana 1",
|
|
29
|
+
icon: "edit",
|
|
30
|
+
link: "1",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
text: "Banana 2",
|
|
34
|
+
icon: "edit",
|
|
35
|
+
link: "2",
|
|
36
|
+
},
|
|
37
|
+
"3",
|
|
38
|
+
"4",
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{ text: "Cherry", icon: "edit", link: "cherry" },
|
|
42
|
+
{ text: "Dragonfruit", icon: "edit", link: "dragonfruit" },
|
|
43
|
+
"tomato",
|
|
44
|
+
"strawberry",
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
text: "V2 Docs",
|
|
49
|
+
icon: "note",
|
|
50
|
+
link: "https://vuepress-theme-hope.github.io/v2/",
|
|
51
|
+
},
|
|
52
|
+
]);
|
|
File without changes
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { navbar } from "vuepress-theme-hope";
|
|
2
|
+
|
|
3
|
+
export const zhNavbar = navbar([
|
|
4
|
+
"/zh/",
|
|
5
|
+
{ text: "演示", icon: "discover", link: "/zh/demo/" },
|
|
6
|
+
{
|
|
7
|
+
text: "博文",
|
|
8
|
+
icon: "edit",
|
|
9
|
+
prefix: "/zh/posts/",
|
|
10
|
+
children: [
|
|
11
|
+
{
|
|
12
|
+
text: "苹果",
|
|
13
|
+
icon: "edit",
|
|
14
|
+
prefix: "apple/",
|
|
15
|
+
children: [
|
|
16
|
+
{ text: "苹果1", icon: "edit", link: "1" },
|
|
17
|
+
{ text: "苹果2", icon: "edit", link: "2" },
|
|
18
|
+
"3",
|
|
19
|
+
"4",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
text: "香蕉",
|
|
24
|
+
icon: "edit",
|
|
25
|
+
prefix: "banana/",
|
|
26
|
+
children: [
|
|
27
|
+
{
|
|
28
|
+
text: "香蕉 1",
|
|
29
|
+
icon: "edit",
|
|
30
|
+
link: "1",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
text: "香蕉 2",
|
|
34
|
+
icon: "edit",
|
|
35
|
+
link: "2",
|
|
36
|
+
},
|
|
37
|
+
"3",
|
|
38
|
+
"4",
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{ text: "樱桃", icon: "edit", link: "cherry" },
|
|
42
|
+
{ text: "火龙果", icon: "edit", link: "dragonfruit" },
|
|
43
|
+
"tomato",
|
|
44
|
+
"strawberry",
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
text: "V2 文档",
|
|
49
|
+
icon: "note",
|
|
50
|
+
link: "https://vuepress-theme-hope.github.io/v2/zh/",
|
|
51
|
+
},
|
|
52
|
+
]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { sidebar } from "vuepress-theme-hope";
|
|
2
|
+
|
|
3
|
+
export const enSidebar = sidebar({
|
|
4
|
+
"/": [
|
|
5
|
+
"",
|
|
6
|
+
{
|
|
7
|
+
icon: "discover",
|
|
8
|
+
text: "Demo",
|
|
9
|
+
prefix: "demo/",
|
|
10
|
+
link: "demo/",
|
|
11
|
+
children: "structure",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
text: "Articles",
|
|
15
|
+
icon: "note",
|
|
16
|
+
prefix: "posts/",
|
|
17
|
+
children: "structure",
|
|
18
|
+
},
|
|
19
|
+
"intro",
|
|
20
|
+
"slides",
|
|
21
|
+
],
|
|
22
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { sidebar } from "vuepress-theme-hope";
|
|
2
|
+
|
|
3
|
+
export const zhSidebar = sidebar({
|
|
4
|
+
"/zh/": [
|
|
5
|
+
"",
|
|
6
|
+
{
|
|
7
|
+
text: "如何使用",
|
|
8
|
+
icon: "creative",
|
|
9
|
+
prefix: "guide/",
|
|
10
|
+
link: "guide/",
|
|
11
|
+
children: "structure",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
text: "文章",
|
|
15
|
+
icon: "note",
|
|
16
|
+
prefix: "posts/",
|
|
17
|
+
children: "structure",
|
|
18
|
+
},
|
|
19
|
+
"intro",
|
|
20
|
+
"slides",
|
|
21
|
+
],
|
|
22
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// place your custom styles here
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { hopeTheme } from "vuepress-theme-hope";
|
|
2
|
+
import { enNavbar, zhNavbar } from "./navbar/index.js";
|
|
3
|
+
import { enSidebar, zhSidebar } from "./sidebar/index.js";
|
|
4
|
+
|
|
5
|
+
export default hopeTheme({
|
|
6
|
+
hostname: "https://mister-hope.github.io",
|
|
7
|
+
|
|
8
|
+
author: {
|
|
9
|
+
name: "Mr.Hope",
|
|
10
|
+
url: "https://mrhope.site",
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
iconAssets: "iconfont",
|
|
14
|
+
|
|
15
|
+
logo: "/logo.svg",
|
|
16
|
+
|
|
17
|
+
repo: "vuepress-theme-hope/vuepress-theme-hope",
|
|
18
|
+
|
|
19
|
+
docsDir: "docs",
|
|
20
|
+
|
|
21
|
+
pageInfo: ["Author", "Original", "Date", "Category", "Tag", "ReadingTime"],
|
|
22
|
+
|
|
23
|
+
blog: {
|
|
24
|
+
medias: {
|
|
25
|
+
Baidu: "https://example.com",
|
|
26
|
+
Bitbucket: "https://example.com",
|
|
27
|
+
Dingding: "https://example.com",
|
|
28
|
+
Discord: "https://example.com",
|
|
29
|
+
Dribbble: "https://example.com",
|
|
30
|
+
Email: "https://example.com",
|
|
31
|
+
Evernote: "https://example.com",
|
|
32
|
+
Facebook: "https://example.com",
|
|
33
|
+
Flipboard: "https://example.com",
|
|
34
|
+
Gitee: "https://example.com",
|
|
35
|
+
GitHub: "https://example.com",
|
|
36
|
+
Gitlab: "https://example.com",
|
|
37
|
+
Gmail: "https://example.com",
|
|
38
|
+
Instagram: "https://example.com",
|
|
39
|
+
Lines: "https://example.com",
|
|
40
|
+
Linkedin: "https://example.com",
|
|
41
|
+
Pinterest: "https://example.com",
|
|
42
|
+
Pocket: "https://example.com",
|
|
43
|
+
QQ: "https://example.com",
|
|
44
|
+
Qzone: "https://example.com",
|
|
45
|
+
Reddit: "https://example.com",
|
|
46
|
+
Rss: "https://example.com",
|
|
47
|
+
Steam: "https://example.com",
|
|
48
|
+
Twitter: "https://example.com",
|
|
49
|
+
Wechat: "https://example.com",
|
|
50
|
+
Weibo: "https://example.com",
|
|
51
|
+
Whatsapp: "https://example.com",
|
|
52
|
+
Youtube: "https://example.com",
|
|
53
|
+
Zhihu: "https://example.com",
|
|
54
|
+
MrHope: [
|
|
55
|
+
"https://mrhope.site",
|
|
56
|
+
'<svg viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient gradientTransform="matrix(.2478 .78133 -2.54797 .63622 910.35 281.58)" gradientUnits="userSpaceOnUse" id="a" x1="37.827" x2="159.988" y1="272.916" y2="274.63"><stop offset=".75" stop-color="#e33939"/><stop offset=".998" stop-color="#fff"/></linearGradient><linearGradient gradientTransform="matrix(.13814 .80797 2.55599 -.6032 34.087 494.369)" gradientUnits="userSpaceOnUse" id="b" x1="37.827" x2="159.988" y1="272.916" y2="274.63"><stop offset=".815" stop-color="#e33939"/><stop offset="1" stop-color="#fff"/></linearGradient></defs><path d="M135.637 588.067c-48.891-201.334 74.605-404.162 275.837-453.028 201.233-48.866 403.998 74.734 452.889 276.068 48.892 201.335-74.606 404.162-275.838 453.029-201.233 48.866-403.997-74.734-452.888-276.069Z" fill="#fde68a" fill-rule="evenodd" stroke="#d08819" stroke-linecap="round" stroke-linejoin="round" stroke-width="10"/><path d="M596.076 197.044c-3.342-56.09 56.897-77.831 89.017-51.361m-410.65 128.819c-22.753-51.377-86.256-43.07-102.659-4.816" fill="none" stroke="#6d5e56" stroke-linecap="round" stroke-linejoin="round" stroke-width="11"/><path d="M833.568 288.02c.05 18.046-12.584 30.699-21.346 32.211-8.762 1.512-17.031-1.099-18.584-1.341 0 0-61.363-6.103-105.627 6.921-44.265 13.026-87.04 47.387-94.637 51.892-6.627 3.928-29.112 7.697-44.462-12.938-15.351-20.636.024-41.526.024-41.526s12.685-18.279 40.771-35.123c28.088-16.844 24.624-13.226 52.326-25.696 15.247-6.865 43.319-14.186 67.429-17.069 25.193-3.011 46.348-1.384 57.673.769 22.165 4.212 28.632 5.93 39.169 9.229 12.451 3.898 27.214 14.516 27.264 32.671Z" fill="#fff" fill-rule="evenodd" stroke="#d08819" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M558.351 345.632c-3.458-14.237 5.214-28.566 19.367-32.003 14.154-3.437 28.43 5.32 31.887 19.557 3.458 14.238-5.212 28.567-19.367 32.004-14.152 3.437-28.43-5.319-31.887-19.558Z" fill="#6d5e56" fill-rule="evenodd" stroke="#6d5e56" stroke-linecap="round" stroke-linejoin="round" stroke-width="6.268"/><path d="M220.249 483.416c46.81-11.689 91.323-.467 99.42 25.064 8.098 25.532-23.286 55.706-70.097 67.393-46.811 11.689-91.323.467-99.42-25.064-8.097-25.532 23.286-55.706 70.097-67.393Z" fill="url(#a)" fill-rule="evenodd" opacity=".261"/><path d="M739.9 357.226c-46.959 11.082-81.367 41.469-76.853 67.871 4.514 26.402 46.241 38.821 93.198 27.738 46.958-11.081 81.366-41.467 76.853-67.869-4.514-26.403-46.241-38.821-93.198-27.74Z" fill="url(#b)" fill-rule="evenodd" opacity=".261"/><path d="M400.934 398.917c-.599 18.034-13.681 30.218-22.494 31.409-8.812 1.192-16.982-1.716-18.526-2.014 0 0-61.109-8.334-105.819 3.07-44.709 11.404-88.696 44.181-96.452 48.406-6.763 3.683-29.372 6.632-43.972-14.546-14.6-21.18 1.519-41.494 1.519-41.494s13.335-17.803 42.013-33.612c28.677-15.809 25.085-12.319 53.222-23.772 15.484-6.304 43.803-12.598 68.005-14.6 25.288-2.093 46.373.305 57.616 2.867 22 5.016 28.401 6.968 38.813 10.649 12.304 4.348 26.677 15.496 26.075 33.637Z" fill="#fff" fill-rule="evenodd" stroke="#d08819" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M129.05 445.546c-3.458-14.239 5.213-28.566 19.367-32.003 14.153-3.437 28.429 5.318 31.887 19.557 3.458 14.238-5.213 28.566-19.367 32.003-14.153 3.437-28.43-5.318-31.887-19.557Z" fill="#6d5e56" fill-rule="evenodd" stroke="#6d5e56" stroke-linecap="round" stroke-linejoin="round" stroke-width="6.268"/><path d="M424.381 696.386s64.427 13.646 101.996 5.757C640.653 678.146 690.8 521.894 690.8 521.894" fill="none" stroke="#d08819" stroke-linecap="round" stroke-linejoin="round" stroke-width="11"/><path d="M796.04 666.774s-10.734-44.165-41.405-11.348c-9.681 10.359-10.438 40.604-28.217 81.89-15.942 37.02-39.564 60.728-42.938 76.063-3.374 15.335.451 35.992 26.352 41.537 25.902 5.545 41.967-23.381 41.967-23.381l44.241-164.761Z" fill="#fde68a" fill-rule="evenodd" stroke="#d08819" stroke-linecap="round" stroke-linejoin="round" stroke-width="10"/><path d="M793.337 664.734c-37.075 160.045-51.73 163.145-40.343 184.845 11.387 21.701 51.417 33.716 71.876-7.313 6.734-13.505-1.31-43.317-1.511-78.077-.307-53.06 16.865-86.111 10.403-98.1-15.332-28.452-39.377-5.875-40.425-1.355Z" fill="#fde68a" fill-rule="evenodd" stroke="#d08819" stroke-linecap="round" stroke-linejoin="round" stroke-width="10"/></svg>',
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
locales: {
|
|
62
|
+
"/": {
|
|
63
|
+
// navbar
|
|
64
|
+
navbar: enNavbar,
|
|
65
|
+
|
|
66
|
+
// sidebar
|
|
67
|
+
sidebar: enSidebar,
|
|
68
|
+
|
|
69
|
+
footer: "Default footer",
|
|
70
|
+
|
|
71
|
+
displayFooter: true,
|
|
72
|
+
|
|
73
|
+
blog: {
|
|
74
|
+
description: "A FrontEnd programmer",
|
|
75
|
+
intro: "/intro.html",
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
metaLocales: {
|
|
79
|
+
editLink: "Edit this page on GitHub",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Chinese locale config
|
|
85
|
+
*/
|
|
86
|
+
"/zh/": {
|
|
87
|
+
// navbar
|
|
88
|
+
navbar: zhNavbar,
|
|
89
|
+
|
|
90
|
+
// sidebar
|
|
91
|
+
sidebar: zhSidebar,
|
|
92
|
+
|
|
93
|
+
footer: "默认页脚",
|
|
94
|
+
|
|
95
|
+
displayFooter: true,
|
|
96
|
+
|
|
97
|
+
blog: {
|
|
98
|
+
description: "一个前端开发者",
|
|
99
|
+
intro: "/zh/intro.html",
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
// page meta
|
|
103
|
+
metaLocales: {
|
|
104
|
+
editLink: "在 GitHub 上编辑此页",
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
encrypt: {
|
|
110
|
+
config: {
|
|
111
|
+
"/demo/encrypt.html": ["1234"],
|
|
112
|
+
"/zh/demo/encrypt.html": ["1234"],
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
plugins: {
|
|
117
|
+
blog: {
|
|
118
|
+
autoExcerpt: true,
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
// If you don't need comment feature, you can remove following option
|
|
122
|
+
// 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.
|
|
123
|
+
// To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
|
|
124
|
+
comment: {
|
|
125
|
+
/**
|
|
126
|
+
* Using Giscus
|
|
127
|
+
*/
|
|
128
|
+
provider: "Giscus",
|
|
129
|
+
repo: "vuepress-theme-hope/giscus-discussions",
|
|
130
|
+
repoId: "R_kgDOG_Pt2A",
|
|
131
|
+
category: "Announcements",
|
|
132
|
+
categoryId: "DIC_kwDOG_Pt2M4COD69",
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Using Twikoo
|
|
136
|
+
*/
|
|
137
|
+
// provider: "Twikoo",
|
|
138
|
+
// envId: "https://twikoo.ccknbc.vercel.app",
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Using Waline
|
|
142
|
+
*/
|
|
143
|
+
// provider: "Waline",
|
|
144
|
+
// serverURL: "https://vuepress-theme-hope-comment.vercel.app",
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
// Disable features you don't want here
|
|
148
|
+
mdEnhance: {
|
|
149
|
+
align: true,
|
|
150
|
+
attrs: true,
|
|
151
|
+
chart: true,
|
|
152
|
+
codetabs: true,
|
|
153
|
+
container: true,
|
|
154
|
+
demo: true,
|
|
155
|
+
echarts: true,
|
|
156
|
+
flowchart: true,
|
|
157
|
+
gfm: true,
|
|
158
|
+
imageSize: true,
|
|
159
|
+
include: true,
|
|
160
|
+
katex: true,
|
|
161
|
+
lazyLoad: true,
|
|
162
|
+
mark: true,
|
|
163
|
+
mermaid: true,
|
|
164
|
+
playground: {
|
|
165
|
+
presets: ["ts", "vue"],
|
|
166
|
+
},
|
|
167
|
+
presentation: {
|
|
168
|
+
plugins: ["highlight", "math", "search", "notes", "zoom"],
|
|
169
|
+
},
|
|
170
|
+
stylize: [
|
|
171
|
+
{
|
|
172
|
+
matcher: "Recommanded",
|
|
173
|
+
replacer: ({ tag }) => {
|
|
174
|
+
if (tag === "em")
|
|
175
|
+
return {
|
|
176
|
+
tag: "Badge",
|
|
177
|
+
attrs: { type: "tip" },
|
|
178
|
+
content: "Recommanded",
|
|
179
|
+
};
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
sub: true,
|
|
184
|
+
sup: true,
|
|
185
|
+
tabs: true,
|
|
186
|
+
vpre: true,
|
|
187
|
+
vuePlayground: true,
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
pwa: {
|
|
191
|
+
favicon: "/favicon.ico",
|
|
192
|
+
cacheHTML: true,
|
|
193
|
+
cachePic: true,
|
|
194
|
+
appendBase: true,
|
|
195
|
+
apple: {
|
|
196
|
+
icon: "/assets/icon/apple-icon-152.png",
|
|
197
|
+
statusBarColor: "black",
|
|
198
|
+
},
|
|
199
|
+
msTile: {
|
|
200
|
+
image: "/assets/icon/ms-icon-144.png",
|
|
201
|
+
color: "#ffffff",
|
|
202
|
+
},
|
|
203
|
+
manifest: {
|
|
204
|
+
icons: [
|
|
205
|
+
{
|
|
206
|
+
src: "/assets/icon/chrome-mask-512.png",
|
|
207
|
+
sizes: "512x512",
|
|
208
|
+
purpose: "maskable",
|
|
209
|
+
type: "image/png",
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
src: "/assets/icon/chrome-mask-192.png",
|
|
213
|
+
sizes: "192x192",
|
|
214
|
+
purpose: "maskable",
|
|
215
|
+
type: "image/png",
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
src: "/assets/icon/chrome-512.png",
|
|
219
|
+
sizes: "512x512",
|
|
220
|
+
type: "image/png",
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
src: "/assets/icon/chrome-192.png",
|
|
224
|
+
sizes: "192x192",
|
|
225
|
+
type: "image/png",
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
shortcuts: [
|
|
229
|
+
{
|
|
230
|
+
name: "Demo",
|
|
231
|
+
short_name: "Demo",
|
|
232
|
+
url: "/demo/",
|
|
233
|
+
icons: [
|
|
234
|
+
{
|
|
235
|
+
src: "/assets/icon/guide-maskable.png",
|
|
236
|
+
sizes: "192x192",
|
|
237
|
+
purpose: "maskable",
|
|
238
|
+
type: "image/png",
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
src: "/assets/icon/guide-monochrome.png",
|
|
242
|
+
sizes: "192x192",
|
|
243
|
+
purpose: "monochrome",
|
|
244
|
+
type: "image/png",
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,14 +2,19 @@
|
|
|
2
2
|
icon: edit
|
|
3
3
|
date: 2022-01-02
|
|
4
4
|
category:
|
|
5
|
-
-
|
|
5
|
+
- Apple
|
|
6
6
|
tag:
|
|
7
|
-
-
|
|
8
|
-
-
|
|
7
|
+
- red
|
|
8
|
+
- big
|
|
9
|
+
- round
|
|
9
10
|
star: true
|
|
10
11
|
---
|
|
11
12
|
|
|
12
|
-
#
|
|
13
|
+
# Apple 2
|
|
14
|
+
|
|
15
|
+
A apple article being stared.
|
|
16
|
+
|
|
17
|
+
<!-- more -->
|
|
13
18
|
|
|
14
19
|
## Heading 2
|
|
15
20
|
|