create-vuepress-theme-hope 2.0.0-beta.40 → 2.0.0-beta.43
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 +2 -2
- package/template/en-US/.vuepress/sidebar.ts +6 -6
- package/template/zh-CN/.vuepress/.cache/default-development/0.pack +0 -0
- package/template/zh-CN/.vuepress/.cache/default-development/1.pack +0 -0
- package/template/zh-CN/.vuepress/.cache/default-development/2.pack +0 -0
- package/template/zh-CN/.vuepress/.cache/default-development/index.pack +0 -0
- package/template/zh-CN/.vuepress/.cache/default-development/index.pack.old +0 -0
- package/template/zh-CN/.vuepress/.temp/blog/type.js +1 -1
- package/template/zh-CN/.vuepress/.temp/internal/clientAppRootComponents.js +0 -2
- package/template/zh-CN/.vuepress/.temp/internal/clientAppSetups.js +5 -3
- package/template/zh-CN/.vuepress/.temp/internal/layoutComponents.js +4 -4
- package/template/zh-CN/.vuepress/.temp/internal/pagesRoutes.js +7 -7
- package/template/zh-CN/.vuepress/.temp/internal/siteData.js +4 -10
- package/template/zh-CN/.vuepress/.temp/internal/themeData.js +20 -46
- package/template/zh-CN/.vuepress/.temp/pages/404.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/article/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/category/categorya/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/category/categoryb/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/category/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/category//344/275/277/347/224/250/346/214/207/345/215/227/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/encrypted/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/guide/disable.html.js +0 -16
- package/template/zh-CN/.vuepress/.temp/pages/guide/encrypt.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/guide/index.html.js +0 -16
- package/template/zh-CN/.vuepress/.temp/pages/guide/markdown.html.js +7 -24
- package/template/zh-CN/.vuepress/.temp/pages/guide/markdown.html.vue +1 -1
- package/template/zh-CN/.vuepress/.temp/pages/guide/page.html.js +0 -16
- package/template/zh-CN/.vuepress/.temp/pages/home.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/index.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article/article1.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article/article2.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article/article3.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article/article4.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article/article5.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article/article6.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article/article7.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article/article8.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article10.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article11.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article12.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/posts/article9.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/slide.html.js +0 -11
- package/template/zh-CN/.vuepress/.temp/pages/slides/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/star/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/tag/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/tag/markdown/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/tag/tag-a/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/tag/tag-b/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/tag//344/275/277/347/224/250/346/214/207/345/215/227/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/tag//346/226/207/347/253/240/345/212/240/345/257/206/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/tag//347/246/201/347/224/250/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/tag//351/241/265/351/235/242/351/205/215/347/275/256/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/pages/timeline/index.html.js +0 -1
- package/template/zh-CN/.vuepress/.temp/sass-palette/hope-inject.scss +2 -5
- package/template/zh-CN/.vuepress/.temp/theme-hope/sidebar.js +1 -1
- package/template/zh-CN/.vuepress/.temp/theme-hope/theme-color.scss +1 -1
- package/template/zh-CN/.vuepress/sidebar.ts +6 -6
package/lib/index.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
|
|
7
7
|
*
|
|
8
8
|
* MIT Licensed
|
|
9
|
-
*/(),i=process.binding("constants"),o=n(),u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",a=/XXXXXX/,s=(i.O_CREAT||i.fs.O_CREAT)|(i.O_EXCL||i.fs.O_EXCL)|(i.O_RDWR||i.fs.O_RDWR),c=i.EBADF||i.os.errno.EBADF,l=i.ENOENT||i.os.errno.ENOENT,f=[];var d=!1,p=!1;function v(e){var t=[],n=null;try{n=r.randomBytes(e)}catch(t){n=r.pseudoRandomBytes(e)}for(var i=0;i<e;i++)t.push(u[n[i]%u.length]);return t.join("")}function y(e){return void 0===e}function m(e,t){return"function"==typeof e?[t||{},e]:y(e)?[{},t]:[e,t]}function g(e){if(e.name)return t.join(e.dir||o,e.name);if(e.template)return e.template.replace(a,v(6));const r=[e.prefix||"tmp-",process.pid,v(12),e.postfix||""].join("");return t.join(e.dir||o,r)}function D(t,r){var n=m(t,r),i=n[0],o=n[1],u=i.name?1:i.tries||3;return isNaN(u)||u<0?o(new Error("Invalid tries")):i.template&&!i.template.match(a)?o(new Error("Invalid template provided")):void function t(){const r=g(i);e.stat(r,(function(e){if(!e)return u-- >0?t():o(new Error("Could not get a unique tmp filename, max tries reached "+r));o(null,r)}))}()}function _(t){var r=m(t)[0],n=r.name?1:r.tries||3;if(isNaN(n)||n<0)throw new Error("Invalid tries");if(r.template&&!r.template.match(a))throw new Error("Invalid template provided");do{const t=g(r);try{e.statSync(t)}catch(e){return t}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function w(r){const n=[r];do{for(var i=n.pop(),o=!1,u=e.readdirSync(i),a=0,s=u.length;a<s;a++){var c=t.join(i,u[a]);e.lstatSync(c).isDirectory()?(o||(o=!0,n.push(i)),n.push(c)):e.unlinkSync(c)}o||e.rmdirSync(i)}while(0!==n.length)}function O(t,r,n){const i=j((function(t){try{0<=t[0]&&e.closeSync(t[0])}catch(e){if(!function(e){return P(e,-c,"EBADF")}(e)&&!C(e))throw e}try{e.unlinkSync(t[1])}catch(e){if(!C(e))throw e}}),[r,t]);return n.keep||f.unshift(i),i}function S(t,r){const n=j(r.unsafeCleanup?w:e.rmdirSync.bind(e),t);return r.keep||f.unshift(n),n}function j(e,t){var r=!1;return function n(i){if(!r){const i=f.indexOf(n);i>=0&&f.splice(i,1),r=!0,e(t)}i&&i(null)}}function x(){if(!p||d)for(;f.length;)try{f[0].call(null)}catch(e){}}function C(e){return P(e,-l,"ENOENT")}function P(e,t,r){return e.code==t||e.code==r}const F=process.versions.node.split(".").map((function(e){return parseInt(e,10)}));return 0===F[0]&&(F[1]<9||9===F[1]&&F[2]<5)&&process.addListener("uncaughtException",(function(e){throw p=!0,x(),e})),process.addListener("exit",(function(e){e&&(p=!0),x()})),rk.tmpdir=o,rk.dir=function(t,r){var n=m(t,r),i=n[0],o=n[1];D(i,(function(t,r){if(t)return o(t);e.mkdir(r,i.mode||448,(function(e){if(e)return o(e);o(null,r,S(r,i))}))}))},rk.dirSync=function(t){var r=m(t)[0];const n=_(r);return e.mkdirSync(n,r.mode||448),{name:n,removeCallback:S(n,r)}},rk.file=function(t,r){var n=m(t,r),i=n[0],o=n[1];i.postfix=y(i.postfix)?".tmp":i.postfix,D(i,(function(t,r){if(t)return o(t);e.open(r,s,i.mode||384,(function(t,n){return t?o(t):i.discardDescriptor?e.close(n,(function(t){if(t){try{e.unlinkSync(r)}catch(e){C(e)||(t=e)}return o(t)}o(null,r,void 0,O(r,-1,i))})):i.detachDescriptor?o(null,r,n,O(r,-1,i)):void o(null,r,n,O(r,n,i))}))}))},rk.fileSync=function(t){var r=m(t)[0];r.postfix=r.postfix||".tmp";const n=r.discardDescriptor||r.detachDescriptor,i=_(r);var o=e.openSync(i,s,r.mode||384);return r.discardDescriptor&&(e.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:O(i,n?-1:o,r)}},rk.tmpName=D,rk.tmpNameSync=_,rk.setGracefulCleanup=function(){d=!0},rk}var ik,ok={};var uk,ak={};var sk,ck={};var lk,fk,dk,pk,hk={};function bk(){if(fk)return GA;fk=1,Object.defineProperty(GA,"__esModule",{value:!0});var e=function(){if(uT)return KA;uT=1;var e=h.default,t=YA(),r=JA(),n=tT(),i=iT(),o=sT(),u=S,a=[new t,new r.UTF_16BE,new r.UTF_16LE,new r.UTF_32BE,new r.UTF_32LE,new n.sjis,new n.big5,new n.euc_jp,new n.euc_kr,new n.gb_18030,new o.ISO_2022_JP,new o.ISO_2022_KR,new o.ISO_2022_CN,new i.ISO_8859_1,new i.ISO_8859_2,new i.ISO_8859_5,new i.ISO_8859_6,new i.ISO_8859_7,new i.ISO_8859_8,new i.ISO_8859_9,new i.windows_1251,new i.windows_1256,new i.KOI8_R];return KA.detect=function(e,t){for(var r=[],n=0;n<256;n++)r[n]=0;for(n=e.length-1;n>=0;n--)r[255&e[n]]++;var i=!1;for(n=128;n<=159;n+=1)if(0!=r[n]){i=!0;break}var o={fByteStats:r,fC1Bytes:i,fRawInput:e,fRawLength:e.length,fInputBytes:e,fInputLen:e.length},u=a.map((function(e){return e.match(o)})).filter((function(e){return!!e})).sort((function(e,t){return t.confidence-e.confidence}));return t&&!0===t.returnAllMatches?u:u.length>0?u[0].name:null},KA.detectFile=function(t,r,n){var i;"function"==typeof r&&(n=r,r=void 0);var o=function(t,o){if(i&&e.closeSync(i),t)return n(t,null);n(null,u.detect(o,r))};if(r&&r.sampleSize)return i=e.openSync(t,"r"),sample=Buffer.allocUnsafe(r.sampleSize),void e.read(i,sample,0,r.sampleSize,null,(function(e){o(e,sample)}));e.readFile(t,o)},KA.detectFileSync=function(t,r){if(r&&r.sampleSize){var n=e.openSync(t,"r"),i=Buffer.allocUnsafe(r.sampleSize);return e.readSync(n,i,0,r.sampleSize),e.closeSync(n),u.detect(i,r)}return u.detect(e.readFileSync(t),r)},KA.detectAll=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detect(e,t)},KA.detectFileAll=function(e,t,r){"function"==typeof t&&(r=t,t=void 0),"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detectFile(e,t,r)},KA.detectFileAllSync=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detectFileSync(e,t)},KA}(),t=v.default,r=h.default,n=JT(),i=nk(),o=function(){if(ik)return ok;ik=1;var e=S&&S.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ok,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to create temporary file for editor")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return ok.CreateFileError=t,ok}();GA.CreateFileError=o.CreateFileError;var u=function(){if(uk)return ak;uk=1;var e=S&&S.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ak,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed launch editor")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return ak.LaunchEditorError=t,ak}();GA.LaunchEditorError=u.LaunchEditorError;var a=function(){if(sk)return ck;sk=1;var e=S&&S.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ck,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to read temporary file")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return ck.ReadFileError=t,ck}();GA.ReadFileError=a.ReadFileError;var s=function(){if(lk)return hk;lk=1;var e=S&&S.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(hk,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to cleanup temporary file")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return hk.RemoveFileError=t,hk}();GA.RemoveFileError=s.RemoveFileError,GA.edit=function(e,t){void 0===e&&(e="");var r=new c(e,t);return r.run(),r.cleanup(),r.text},GA.editAsync=function(e,t,r){void 0===e&&(e="");var n=new c(e,r);n.runAsync((function(e,r){if(e)setImmediate(t,e,null);else try{n.cleanup(),setImmediate(t,null,r)}catch(e){setImmediate(t,e,null)}}))};var c=function(){function c(e,t){void 0===e&&(e=""),this.text="",this.fileOptions={},this.text=e,t&&(this.fileOptions=t),this.determineEditor(),this.createTemporaryFile()}return c.splitStringBySpace=function(e){for(var t=[],r="",n=0;n<e.length;n++){var i=e[n];n>0&&" "===i&&"\\"!==e[n-1]&&r.length>0?(t.push(r),r=""):r+=i}return r.length>0&&t.push(r),t},Object.defineProperty(c.prototype,"temp_file",{get:function(){return console.log("DEPRECATED: temp_file. Use tempFile moving forward."),this.tempFile},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"last_exit_status",{get:function(){return console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward."),this.lastExitStatus},enumerable:!0,configurable:!0}),c.prototype.run=function(){return this.launchEditor(),this.readTemporaryFile(),this.text},c.prototype.runAsync=function(e){var t=this;try{this.launchEditorAsync((function(){try{t.readTemporaryFile(),setImmediate(e,null,t.text)}catch(t){setImmediate(e,t,null)}}))}catch(t){setImmediate(e,t,null)}},c.prototype.cleanup=function(){this.removeTemporaryFile()},c.prototype.determineEditor=function(){var e=process.env.VISUAL?process.env.VISUAL:process.env.EDITOR?process.env.EDITOR:/^win/.test(process.platform)?"notepad":"vim",t=c.splitStringBySpace(e).map((function(e){return e.replace("\\ "," ")})),r=t.shift();this.editor={args:t,bin:r}},c.prototype.createTemporaryFile=function(){try{this.tempFile=i.tmpNameSync(this.fileOptions);var e={encoding:"utf8"};this.fileOptions.hasOwnProperty("mode")&&(e.mode=this.fileOptions.mode),r.writeFileSync(this.tempFile,this.text,e)}catch(e){throw new o.CreateFileError(e)}},c.prototype.readTemporaryFile=function(){try{var t=r.readFileSync(this.tempFile);if(0===t.length)this.text="";else{var i=e.detect(t).toString();n.encodingExists(i)||(i="utf8"),this.text=n.decode(t,i)}}catch(e){throw new a.ReadFileError(e)}},c.prototype.removeTemporaryFile=function(){try{r.unlinkSync(this.tempFile)}catch(e){throw new s.RemoveFileError(e)}},c.prototype.launchEditor=function(){try{var e=t.spawnSync(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=e.status}catch(e){throw new u.LaunchEditorError(e)}},c.prototype.launchEditorAsync=function(e){var r=this;try{t.spawn(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",(function(t){r.lastExitStatus=t,setImmediate(e)}))}catch(e){throw new u.LaunchEditorError(e)}},c}();return GA.ExternalEditor=c,GA}!function(e){const t=e.exports;t.prompts={},t.Separator=ti,t.ui={BottomBar:vi,Prompt:BE},t.createPromptModule=function(e){const r=function(n,i){let o;try{o=new t.ui.Prompt(r.prompts,e)}catch(e){return Promise.reject(e)}const u=o.run(n,i);return u.ui=o,u};return r.prompts={},r.registerPrompt=function(e,t){return r.prompts[e]=t,this},r.restoreDefaultPrompts=function(){this.registerPrompt("list",RA()),this.registerPrompt("input",LA()),this.registerPrompt("number",function(){if(fA)return lA;fA=1;const e=LA();return lA=class extends e{filterInput(e){if(e&&"string"==typeof e){const t=(e=e.trim()).match(/(^-?\d+|^\d+\.\d*|^\d*\.\d+)(e\d+)?$/);if(t)return Number(t[0])}return null==this.opt.default?NaN:this.opt.default}},lA}()),this.registerPrompt("confirm",function(){if(pA)return dA;pA=1;const e=zn,{take:t,takeUntil:r}=FO,n=kA(),i=MA();return dA=class extends n{constructor(e,t,r){super(e,t,r);let n=!0;Object.assign(this.opt,{filter(e){let t=n;return null!=e&&""!==e&&(t=/^y(es)?/i.test(e)),t}}),null!=this.opt.default&&(n=Boolean(this.opt.default)),this.opt.default=n?"Y/n":"y/N"}_run(e){this.done=e;const n=i(this.rl);return n.keypress.pipe(r(n.line)).forEach(this.onKeypress.bind(this)),n.line.pipe(t(1)).forEach(this.onEnd.bind(this)),this.render(),this}render(t){let r=this.getQuestion();return r+="boolean"==typeof t?e.cyan(t?"Yes":"No"):this.rl.line,this.screen.render(r),this}onEnd(e){this.status="answered";const t=this.opt.filter(e);this.render(t),this.screen.done(),this.done(t)}onKeypress(){this.render()}},dA}()),this.registerPrompt("rawlist",NA()),this.registerPrompt("expand",UA()),this.registerPrompt("checkbox",WA()),this.registerPrompt("password",function(){if(_A)return DA;_A=1;const e=zn,{map:t,takeUntil:r}=FO,n=kA(),i=MA();function o(e,t){return t="string"==typeof t?t:"*",0===(e=String(e)).length?"":new Array(e.length+1).join(t)}return DA=class extends n{_run(e){this.done=e;const n=i(this.rl),o=n.line.pipe(t(this.filterInput.bind(this))),u=this.handleSubmitEvents(o);return u.success.forEach(this.onEnd.bind(this)),u.error.forEach(this.onError.bind(this)),n.keypress.pipe(r(u.success)).forEach(this.onKeypress.bind(this)),this.render(),this}render(t){let r=this.getQuestion(),n="";"answered"===this.status?r+=this.getMaskedValue(this.answer):r+=this.getMaskedValue(this.rl.line||""),t&&(n="\n"+e.red(">> ")+t),this.screen.render(r,n)}getMaskedValue(t){return"answered"===this.status?this.opt.mask?e.cyan(o(t,this.opt.mask)):e.italic.dim("[hidden]"):this.opt.mask?o(t,this.opt.mask):e.italic.dim("[input is hidden] ")}getSpinningValue(e){return this.getMaskedValue(e)}filterInput(e){return e||(null==this.opt.default?"":this.opt.default)}onEnd(e){this.status="answered",this.answer=e.value,this.render(),this.screen.done(),this.done(e.value)}onError(e){this.render(e.isValid)}onKeypress(){this.opt.default&&(this.opt.default=void 0),this.render()}},DA}()),this.registerPrompt("editor",function(){if(pk)return dk;pk=1;const e=zn,{editAsync:t}=bk(),r=kA(),n=MA(),{Subject:i}=Ea;return dk=class extends r{_run(e){this.done=e,this.editorResult=new i;const t=n(this.rl);this.lineSubscription=t.line.subscribe(this.startExternalEditor.bind(this));const r=this.handleSubmitEvents(this.editorResult);return r.success.forEach(this.onEnd.bind(this)),r.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,this.render(),this}render(t){let r="",n=this.getQuestion();"answered"===this.status?n+=e.dim("Received"):n+=e.dim("Press <enter> to launch your preferred editor."),t&&(r=e.red(">> ")+t),this.screen.render(n,r)}startExternalEditor(){this.rl.pause(),t(this.currentText,this.endExternalEditor.bind(this))}endExternalEditor(e,t){this.rl.resume(),e?this.editorResult.error(e):this.editorResult.next(t)}onEnd(e){this.editorResult.unsubscribe(),this.lineSubscription.unsubscribe(),this.answer=e.value,this.status="answered",this.render(),this.screen.done(),this.done(this.answer)}onError(e){this.render(e.isValid)}},dk}())},r.restoreDefaultPrompts(),r},t.prompt=t.createPromptModule(),t.registerPrompt=function(e,r){t.prompt.registerPrompt(e,r)},t.restoreDefaultPrompts=function(){t.prompt.restoreDefaultPrompts()}}(cn);const vk=(()=>{try{return 0===Zr("yarn --version",{stdio:"ignore"}).exitCode}catch(e){return!1}})()?"yarn":"npm",yk=async e=>{for(let t=1;t<=3;t++){const r=await new Promise(((t,r)=>{f.get(`${"npm"===vk?"https://registry.npmjs.org":"https://registry.yarnpkg.com"}/-/package/${e}/dist-tags`,(e=>{if(200===e.statusCode){let r="";e.on("data",(e=>r+=e)),e.on("end",(()=>{t(JSON.parse(r).next)}))}else r()})).on("error",(()=>{r()}))})).catch((()=>{console.log(`Get ${e} version failed, [${t}/3]`)}));if(r)return r}throw new Error(`Get ${e} version failed!`)},mk=(e,...t)=>{if(0===t.length)return e;const r=t.shift()||{};return Object.keys(r).forEach((t=>{"object"!=typeof e[t]||Array.isArray(e[t])||"object"!=typeof r[t]||Array.isArray(r[t])?"object"==typeof r[t]?Array.isArray(r[t])?e[t]=[...r[t]]:e[t]={...r[t]}:e[t]=r[t]:mk(e[t],r[t])})),mk(e,...t)},gk=t=>{try{e.readdirSync(t)}catch(r){e.mkdirSync(t,{recursive:!0})}},Dk=(r,n)=>{const i=t.dirname(n);gk(i);const o=e.createReadStream(r),u=e.createWriteStream(n);o.pipe(u)},_k=(t,r)=>{gk(r);e.readdirSync(t,{withFileTypes:!0}).forEach((e=>{e.isFile()?Dk(`${t}/${e.name}`,`${r}/${e.name}`):e.isDirectory()&&_k(`${t}/${e.name}`,`${r}/${e.name}`)}))},wk={"简体中文":{getVersion:"获取依赖的最新版本...",createPackage:"生成 package.json...",updatePackage:"更新 package.json...",template:"生成模板...",wait:"这可能需要数分钟,请耐心等待.\n我们无法正确输出子进程的进度条,所以进程可能会看似未响应",install:"安装依赖...",success:"模板已成功生成!",devServerAsk:"是否想要现在启动 Demo 查看?",devServer:"启动开发服务器...\n启动成功后,请在浏览器输入给出的开发服务器地址(默认为 'localhost:8080')",hint:`提示: 请使用 "${vk} 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:"项目需要用到多语言么?",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 "${vk} 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 mutiple languages?",workflowMessage:"Do you need a GitHub workflow to deploy docs on GitHub pages?"}},Ok=async()=>{const{language:e}=await cn.exports.prompt([{name:"language",type:"list",message:"Select a language to display / 选择显示语言",choices:["english (US)","简体中文"]}]);return{lang:e,message:wk[e]}},Ek=async e=>{const t=Zr(vk,["config","get","registry"]).stdout;if("简体中文"===e){const{registry:e}=await cn.exports.prompt([{name:"registry",type:"list",message:"选择你想使用的源",choices:["国内镜像源","当前源"]}]);return"国内镜像源"===e?"https://registry.npmmirror.com/":t}return t},Sk=((e="")=>new re(e))("vuepress-theme-hope");Sk.command("[dir]","Generate a new vuepress-theme-hope project").action((async r=>{if(!r)return Sk.outputHelp();const{lang:n,message:i}=await Ok();if(r.startsWith("[")&&r.endsWith("]"))return console.log(i.dirError);console.log(i.getVersion);const o=t.resolve(process.cwd(),"package.json"),u=(e=>({"docs:build":`vuepress build ${e}`,"docs:clean-dev":`vuepress dev ${e} --clean-cache`,"docs:dev":`vuepress dev ${e}`}))(r),a=await(async()=>({vuepress:`^${await yk("vuepress")}`,"vuepress-theme-hope":`^${await yk("vuepress-theme-hope")}`}))();if(e.existsSync(o)){console.log(i.updatePackage);const t=JSON.parse(e.readFileSync(o,{encoding:"utf-8"}));mk(t,{scripts:u,devDependencies:a}),e.writeFileSync(o,`${JSON.stringify(t,null,2)}\n`,{encoding:"utf-8"})}else{console.log(i.createPackage);const t=await cn.exports.prompt([{name:"name",type:"input",message:i.nameMessage,default:"vuepress-theme-hope-template",validate:e=>!!/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u.exec(e)||i.nameError},{name:"version",type:"input",message:i.versionMessage,default:"2.0.0",validate:e=>!!/^[0-9]+\.[0-9]+\.(?:[0=9]+|[0-9]+-[a-z]+\.[0-9])$/u.exec(e)||i.versionError},{name:"description",type:"input",message:i.descriptionMessage,default:"A project of vuepress-theme-hope"},{name:"license",type:"input",message:i.licenseMessage,default:"MIT"}]),r={...t,scripts:u,devDependencies:a};e.writeFileSync(o,`${JSON.stringify(r,null,2)}\n`,{encoding:"utf-8"})}const{i18n:s,workflow:c}=await cn.exports.prompt([{name:"i18n",type:"confirm",message:i.i18nMessage,default:!1},{name:"workflow",type:"confirm",message:i.workflowMessage,default:!0}]);console.log(i.template);const l=s?"i18n":"简体中文"===n?"zh-CN":"en-US";var f,d;if(f=t.resolve(__dirname,"../template",l),d=t.resolve(process.cwd(),r),e.statSync(f).isDirectory()?_k(f,d):e.statSync(f).isFile()&&Dk(f,d),c){const i=t.resolve(process.cwd(),".github/workflows");gk(i),e.writeFileSync(t.resolve(i,"deploy-docs.yml"),((e,r)=>`\nname: ${"简体中文"===r?"部署文档":"Deploy Docs"}\n\non:\n push:\n branches:\n # ${"简体中文"===r?"确保这是你正在使用的分支名称":"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 # ${"简体中文"===r?"如果你文档需要 Git 子模块,取消注释下一行":"if your docs needs submodules, uncomment the following line"}\n # submodules: true\n\n - uses: actions/cache@v3\n id: node-modules\n with:\n path: node_modules/\n key: \${{ runner.os }}-node-modules-\${{ hashFiles('${"yarn"===vk?"yarn.lock":"package-lock.json"}') }}\n restore-keys: |\n \${{ runner.os }}-node-modules-\n\n - name: ${"简体中文"===r?"安装依赖":"Install Deps"}\n if: steps.node-modules.outputs.cache-hit != 'true'\n run: ${"yarn"===vk?"yarn install --frozen-lockfile":"npm install"}\n\n - name: ${"简体中文"===r?"构建文档":"Build Docs"}\n env:\n NODE_OPTIONS: --max_old_space_size=4096\n run: ${vk} run docs:build\n\n - name: ${"简体中文"===r?"部署文档":"Deploy Docs"}\n uses: JamesIves/github-pages-deploy-action@v4\n with:\n # ${"简体中文"===r?"这是文档部署到的分支名称":"This is the branch where the docs are deployed to"}\n branch: gh-pages\n folder: ${t.join(e,".vuepress/dist").replace(/\\/g,"/")}\n\n`)(r,n),{encoding:"utf-8"})}const p=t.resolve(process.cwd(),".gitignore"),h=e.existsSync(p)?e.readFileSync(p,{encoding:"utf-8"}):"";e.writeFileSync(p,`${h}${(e=>`\nnode_modules/\n${e}/.vuepress/.cache/\n${e}/.vuepress/.temp/\n${e}/.vuepress/dist/\n`)(r)}`,{encoding:"utf-8"});const b=await Ek(n);console.log(i.install),console.warn(i.wait),se.exports.sync(vk,["install","--registry",b],{stdout:"inherit"}),console.log(i.success);const{choise:v}=await cn.exports.prompt([{name:"choise",type:"confirm",message:i.devServerAsk,default:!0}]);v?(console.log(i.devServer),await se.exports(vk,["run","docs:dev"],{stdout:"inherit"})):console.log(i.hint)})),Sk.help((()=>[{title:"yarn create vuepress-theme-hope [dir] / npm init vuepress-theme-hope [dir]",body:"Create a vuepress-theme-hope template in [dir]"}])),Sk.parse();
|
|
9
|
+
*/(),i=process.binding("constants"),o=n(),u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",a=/XXXXXX/,s=(i.O_CREAT||i.fs.O_CREAT)|(i.O_EXCL||i.fs.O_EXCL)|(i.O_RDWR||i.fs.O_RDWR),c=i.EBADF||i.os.errno.EBADF,l=i.ENOENT||i.os.errno.ENOENT,f=[];var d=!1,p=!1;function v(e){var t=[],n=null;try{n=r.randomBytes(e)}catch(t){n=r.pseudoRandomBytes(e)}for(var i=0;i<e;i++)t.push(u[n[i]%u.length]);return t.join("")}function y(e){return void 0===e}function m(e,t){return"function"==typeof e?[t||{},e]:y(e)?[{},t]:[e,t]}function g(e){if(e.name)return t.join(e.dir||o,e.name);if(e.template)return e.template.replace(a,v(6));const r=[e.prefix||"tmp-",process.pid,v(12),e.postfix||""].join("");return t.join(e.dir||o,r)}function D(t,r){var n=m(t,r),i=n[0],o=n[1],u=i.name?1:i.tries||3;return isNaN(u)||u<0?o(new Error("Invalid tries")):i.template&&!i.template.match(a)?o(new Error("Invalid template provided")):void function t(){const r=g(i);e.stat(r,(function(e){if(!e)return u-- >0?t():o(new Error("Could not get a unique tmp filename, max tries reached "+r));o(null,r)}))}()}function _(t){var r=m(t)[0],n=r.name?1:r.tries||3;if(isNaN(n)||n<0)throw new Error("Invalid tries");if(r.template&&!r.template.match(a))throw new Error("Invalid template provided");do{const t=g(r);try{e.statSync(t)}catch(e){return t}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function w(r){const n=[r];do{for(var i=n.pop(),o=!1,u=e.readdirSync(i),a=0,s=u.length;a<s;a++){var c=t.join(i,u[a]);e.lstatSync(c).isDirectory()?(o||(o=!0,n.push(i)),n.push(c)):e.unlinkSync(c)}o||e.rmdirSync(i)}while(0!==n.length)}function O(t,r,n){const i=j((function(t){try{0<=t[0]&&e.closeSync(t[0])}catch(e){if(!function(e){return P(e,-c,"EBADF")}(e)&&!C(e))throw e}try{e.unlinkSync(t[1])}catch(e){if(!C(e))throw e}}),[r,t]);return n.keep||f.unshift(i),i}function S(t,r){const n=j(r.unsafeCleanup?w:e.rmdirSync.bind(e),t);return r.keep||f.unshift(n),n}function j(e,t){var r=!1;return function n(i){if(!r){const i=f.indexOf(n);i>=0&&f.splice(i,1),r=!0,e(t)}i&&i(null)}}function x(){if(!p||d)for(;f.length;)try{f[0].call(null)}catch(e){}}function C(e){return P(e,-l,"ENOENT")}function P(e,t,r){return e.code==t||e.code==r}const F=process.versions.node.split(".").map((function(e){return parseInt(e,10)}));return 0===F[0]&&(F[1]<9||9===F[1]&&F[2]<5)&&process.addListener("uncaughtException",(function(e){throw p=!0,x(),e})),process.addListener("exit",(function(e){e&&(p=!0),x()})),rk.tmpdir=o,rk.dir=function(t,r){var n=m(t,r),i=n[0],o=n[1];D(i,(function(t,r){if(t)return o(t);e.mkdir(r,i.mode||448,(function(e){if(e)return o(e);o(null,r,S(r,i))}))}))},rk.dirSync=function(t){var r=m(t)[0];const n=_(r);return e.mkdirSync(n,r.mode||448),{name:n,removeCallback:S(n,r)}},rk.file=function(t,r){var n=m(t,r),i=n[0],o=n[1];i.postfix=y(i.postfix)?".tmp":i.postfix,D(i,(function(t,r){if(t)return o(t);e.open(r,s,i.mode||384,(function(t,n){return t?o(t):i.discardDescriptor?e.close(n,(function(t){if(t){try{e.unlinkSync(r)}catch(e){C(e)||(t=e)}return o(t)}o(null,r,void 0,O(r,-1,i))})):i.detachDescriptor?o(null,r,n,O(r,-1,i)):void o(null,r,n,O(r,n,i))}))}))},rk.fileSync=function(t){var r=m(t)[0];r.postfix=r.postfix||".tmp";const n=r.discardDescriptor||r.detachDescriptor,i=_(r);var o=e.openSync(i,s,r.mode||384);return r.discardDescriptor&&(e.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:O(i,n?-1:o,r)}},rk.tmpName=D,rk.tmpNameSync=_,rk.setGracefulCleanup=function(){d=!0},rk}var ik,ok={};var uk,ak={};var sk,ck={};var lk,fk,dk,pk,hk={};function bk(){if(fk)return GA;fk=1,Object.defineProperty(GA,"__esModule",{value:!0});var e=function(){if(uT)return KA;uT=1;var e=h.default,t=YA(),r=JA(),n=tT(),i=iT(),o=sT(),u=S,a=[new t,new r.UTF_16BE,new r.UTF_16LE,new r.UTF_32BE,new r.UTF_32LE,new n.sjis,new n.big5,new n.euc_jp,new n.euc_kr,new n.gb_18030,new o.ISO_2022_JP,new o.ISO_2022_KR,new o.ISO_2022_CN,new i.ISO_8859_1,new i.ISO_8859_2,new i.ISO_8859_5,new i.ISO_8859_6,new i.ISO_8859_7,new i.ISO_8859_8,new i.ISO_8859_9,new i.windows_1251,new i.windows_1256,new i.KOI8_R];return KA.detect=function(e,t){for(var r=[],n=0;n<256;n++)r[n]=0;for(n=e.length-1;n>=0;n--)r[255&e[n]]++;var i=!1;for(n=128;n<=159;n+=1)if(0!=r[n]){i=!0;break}var o={fByteStats:r,fC1Bytes:i,fRawInput:e,fRawLength:e.length,fInputBytes:e,fInputLen:e.length},u=a.map((function(e){return e.match(o)})).filter((function(e){return!!e})).sort((function(e,t){return t.confidence-e.confidence}));return t&&!0===t.returnAllMatches?u:u.length>0?u[0].name:null},KA.detectFile=function(t,r,n){var i;"function"==typeof r&&(n=r,r=void 0);var o=function(t,o){if(i&&e.closeSync(i),t)return n(t,null);n(null,u.detect(o,r))};if(r&&r.sampleSize)return i=e.openSync(t,"r"),sample=Buffer.allocUnsafe(r.sampleSize),void e.read(i,sample,0,r.sampleSize,null,(function(e){o(e,sample)}));e.readFile(t,o)},KA.detectFileSync=function(t,r){if(r&&r.sampleSize){var n=e.openSync(t,"r"),i=Buffer.allocUnsafe(r.sampleSize);return e.readSync(n,i,0,r.sampleSize),e.closeSync(n),u.detect(i,r)}return u.detect(e.readFileSync(t),r)},KA.detectAll=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detect(e,t)},KA.detectFileAll=function(e,t,r){"function"==typeof t&&(r=t,t=void 0),"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detectFile(e,t,r)},KA.detectFileAllSync=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detectFileSync(e,t)},KA}(),t=v.default,r=h.default,n=JT(),i=nk(),o=function(){if(ik)return ok;ik=1;var e=S&&S.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ok,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to create temporary file for editor")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return ok.CreateFileError=t,ok}();GA.CreateFileError=o.CreateFileError;var u=function(){if(uk)return ak;uk=1;var e=S&&S.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ak,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed launch editor")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return ak.LaunchEditorError=t,ak}();GA.LaunchEditorError=u.LaunchEditorError;var a=function(){if(sk)return ck;sk=1;var e=S&&S.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ck,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to read temporary file")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return ck.ReadFileError=t,ck}();GA.ReadFileError=a.ReadFileError;var s=function(){if(lk)return hk;lk=1;var e=S&&S.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(hk,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to cleanup temporary file")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return hk.RemoveFileError=t,hk}();GA.RemoveFileError=s.RemoveFileError,GA.edit=function(e,t){void 0===e&&(e="");var r=new c(e,t);return r.run(),r.cleanup(),r.text},GA.editAsync=function(e,t,r){void 0===e&&(e="");var n=new c(e,r);n.runAsync((function(e,r){if(e)setImmediate(t,e,null);else try{n.cleanup(),setImmediate(t,null,r)}catch(e){setImmediate(t,e,null)}}))};var c=function(){function c(e,t){void 0===e&&(e=""),this.text="",this.fileOptions={},this.text=e,t&&(this.fileOptions=t),this.determineEditor(),this.createTemporaryFile()}return c.splitStringBySpace=function(e){for(var t=[],r="",n=0;n<e.length;n++){var i=e[n];n>0&&" "===i&&"\\"!==e[n-1]&&r.length>0?(t.push(r),r=""):r+=i}return r.length>0&&t.push(r),t},Object.defineProperty(c.prototype,"temp_file",{get:function(){return console.log("DEPRECATED: temp_file. Use tempFile moving forward."),this.tempFile},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"last_exit_status",{get:function(){return console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward."),this.lastExitStatus},enumerable:!0,configurable:!0}),c.prototype.run=function(){return this.launchEditor(),this.readTemporaryFile(),this.text},c.prototype.runAsync=function(e){var t=this;try{this.launchEditorAsync((function(){try{t.readTemporaryFile(),setImmediate(e,null,t.text)}catch(t){setImmediate(e,t,null)}}))}catch(t){setImmediate(e,t,null)}},c.prototype.cleanup=function(){this.removeTemporaryFile()},c.prototype.determineEditor=function(){var e=process.env.VISUAL?process.env.VISUAL:process.env.EDITOR?process.env.EDITOR:/^win/.test(process.platform)?"notepad":"vim",t=c.splitStringBySpace(e).map((function(e){return e.replace("\\ "," ")})),r=t.shift();this.editor={args:t,bin:r}},c.prototype.createTemporaryFile=function(){try{this.tempFile=i.tmpNameSync(this.fileOptions);var e={encoding:"utf8"};this.fileOptions.hasOwnProperty("mode")&&(e.mode=this.fileOptions.mode),r.writeFileSync(this.tempFile,this.text,e)}catch(e){throw new o.CreateFileError(e)}},c.prototype.readTemporaryFile=function(){try{var t=r.readFileSync(this.tempFile);if(0===t.length)this.text="";else{var i=e.detect(t).toString();n.encodingExists(i)||(i="utf8"),this.text=n.decode(t,i)}}catch(e){throw new a.ReadFileError(e)}},c.prototype.removeTemporaryFile=function(){try{r.unlinkSync(this.tempFile)}catch(e){throw new s.RemoveFileError(e)}},c.prototype.launchEditor=function(){try{var e=t.spawnSync(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=e.status}catch(e){throw new u.LaunchEditorError(e)}},c.prototype.launchEditorAsync=function(e){var r=this;try{t.spawn(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",(function(t){r.lastExitStatus=t,setImmediate(e)}))}catch(e){throw new u.LaunchEditorError(e)}},c}();return GA.ExternalEditor=c,GA}!function(e){const t=e.exports;t.prompts={},t.Separator=ti,t.ui={BottomBar:vi,Prompt:BE},t.createPromptModule=function(e){const r=function(n,i){let o;try{o=new t.ui.Prompt(r.prompts,e)}catch(e){return Promise.reject(e)}const u=o.run(n,i);return u.ui=o,u};return r.prompts={},r.registerPrompt=function(e,t){return r.prompts[e]=t,this},r.restoreDefaultPrompts=function(){this.registerPrompt("list",RA()),this.registerPrompt("input",LA()),this.registerPrompt("number",function(){if(fA)return lA;fA=1;const e=LA();return lA=class extends e{filterInput(e){if(e&&"string"==typeof e){const t=(e=e.trim()).match(/(^-?\d+|^\d+\.\d*|^\d*\.\d+)(e\d+)?$/);if(t)return Number(t[0])}return null==this.opt.default?NaN:this.opt.default}},lA}()),this.registerPrompt("confirm",function(){if(pA)return dA;pA=1;const e=zn,{take:t,takeUntil:r}=FO,n=kA(),i=MA();return dA=class extends n{constructor(e,t,r){super(e,t,r);let n=!0;Object.assign(this.opt,{filter(e){let t=n;return null!=e&&""!==e&&(t=/^y(es)?/i.test(e)),t}}),null!=this.opt.default&&(n=Boolean(this.opt.default)),this.opt.default=n?"Y/n":"y/N"}_run(e){this.done=e;const n=i(this.rl);return n.keypress.pipe(r(n.line)).forEach(this.onKeypress.bind(this)),n.line.pipe(t(1)).forEach(this.onEnd.bind(this)),this.render(),this}render(t){let r=this.getQuestion();return r+="boolean"==typeof t?e.cyan(t?"Yes":"No"):this.rl.line,this.screen.render(r),this}onEnd(e){this.status="answered";const t=this.opt.filter(e);this.render(t),this.screen.done(),this.done(t)}onKeypress(){this.render()}},dA}()),this.registerPrompt("rawlist",NA()),this.registerPrompt("expand",UA()),this.registerPrompt("checkbox",WA()),this.registerPrompt("password",function(){if(_A)return DA;_A=1;const e=zn,{map:t,takeUntil:r}=FO,n=kA(),i=MA();function o(e,t){return t="string"==typeof t?t:"*",0===(e=String(e)).length?"":new Array(e.length+1).join(t)}return DA=class extends n{_run(e){this.done=e;const n=i(this.rl),o=n.line.pipe(t(this.filterInput.bind(this))),u=this.handleSubmitEvents(o);return u.success.forEach(this.onEnd.bind(this)),u.error.forEach(this.onError.bind(this)),n.keypress.pipe(r(u.success)).forEach(this.onKeypress.bind(this)),this.render(),this}render(t){let r=this.getQuestion(),n="";"answered"===this.status?r+=this.getMaskedValue(this.answer):r+=this.getMaskedValue(this.rl.line||""),t&&(n="\n"+e.red(">> ")+t),this.screen.render(r,n)}getMaskedValue(t){return"answered"===this.status?this.opt.mask?e.cyan(o(t,this.opt.mask)):e.italic.dim("[hidden]"):this.opt.mask?o(t,this.opt.mask):e.italic.dim("[input is hidden] ")}getSpinningValue(e){return this.getMaskedValue(e)}filterInput(e){return e||(null==this.opt.default?"":this.opt.default)}onEnd(e){this.status="answered",this.answer=e.value,this.render(),this.screen.done(),this.done(e.value)}onError(e){this.render(e.isValid)}onKeypress(){this.opt.default&&(this.opt.default=void 0),this.render()}},DA}()),this.registerPrompt("editor",function(){if(pk)return dk;pk=1;const e=zn,{editAsync:t}=bk(),r=kA(),n=MA(),{Subject:i}=Ea;return dk=class extends r{_run(e){this.done=e,this.editorResult=new i;const t=n(this.rl);this.lineSubscription=t.line.subscribe(this.startExternalEditor.bind(this));const r=this.handleSubmitEvents(this.editorResult);return r.success.forEach(this.onEnd.bind(this)),r.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,this.render(),this}render(t){let r="",n=this.getQuestion();"answered"===this.status?n+=e.dim("Received"):n+=e.dim("Press <enter> to launch your preferred editor."),t&&(r=e.red(">> ")+t),this.screen.render(n,r)}startExternalEditor(){this.rl.pause(),t(this.currentText,this.endExternalEditor.bind(this))}endExternalEditor(e,t){this.rl.resume(),e?this.editorResult.error(e):this.editorResult.next(t)}onEnd(e){this.editorResult.unsubscribe(),this.lineSubscription.unsubscribe(),this.answer=e.value,this.status="answered",this.render(),this.screen.done(),this.done(this.answer)}onError(e){this.render(e.isValid)}},dk}())},r.restoreDefaultPrompts(),r},t.prompt=t.createPromptModule(),t.registerPrompt=function(e,r){t.prompt.registerPrompt(e,r)},t.restoreDefaultPrompts=function(){t.prompt.restoreDefaultPrompts()}}(cn);const vk=(()=>{try{return 0===Zr("yarn --version",{stdio:"ignore"}).exitCode}catch(e){return!1}})()?"yarn":"npm",yk=async e=>{for(let t=1;t<=3;t++){const r=await new Promise(((t,r)=>{f.get(`${"npm"===vk?"https://registry.npmjs.org":"https://registry.yarnpkg.com"}/-/package/${e}/dist-tags`,(e=>{if(200===e.statusCode){let r="";e.on("data",(e=>r+=e)),e.on("end",(()=>{t(JSON.parse(r).next)}))}else r()})).on("error",(()=>{r()}))})).catch((()=>{console.log(`Get ${e} version failed, [${t}/3]`)}));if(r)return r}throw new Error(`Get ${e} version failed!`)},mk=(e,...t)=>{if(0===t.length)return e;const r=t.shift()||{};return Object.keys(r).forEach((t=>{"object"!=typeof e[t]||Array.isArray(e[t])||"object"!=typeof r[t]||Array.isArray(r[t])?"object"==typeof r[t]?Array.isArray(r[t])?e[t]=[...r[t]]:e[t]={...r[t]}:e[t]=r[t]:mk(e[t],r[t])})),mk(e,...t)},gk=t=>{try{e.readdirSync(t)}catch(r){e.mkdirSync(t,{recursive:!0})}},Dk=(r,n)=>{const i=t.dirname(n);gk(i);const o=e.createReadStream(r),u=e.createWriteStream(n);o.pipe(u)},_k=(t,r)=>{gk(r);e.readdirSync(t,{withFileTypes:!0}).forEach((e=>{e.isFile()?Dk(`${t}/${e.name}`,`${r}/${e.name}`):e.isDirectory()&&_k(`${t}/${e.name}`,`${r}/${e.name}`)}))},wk={"简体中文":{getVersion:"获取依赖的最新版本...",createPackage:"生成 package.json...",updatePackage:"更新 package.json...",template:"生成模板...",wait:"这可能需要数分钟,请耐心等待.\n我们无法正确输出子进程的进度条,所以进程可能会看似未响应",install:"安装依赖...",success:"模板已成功生成!",devServerAsk:"是否想要现在启动 Demo 查看?",devServer:"启动开发服务器...\n启动成功后,请在浏览器输入给出的开发服务器地址(默认为 'localhost:8080')",hint:`提示: 请使用 "${vk} 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:"项目需要用到多语言么?",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 "${vk} 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 mutiple languages?",workflowMessage:"Do you need a GitHub workflow to deploy docs on GitHub pages?"}},Ok=async()=>{const{language:e}=await cn.exports.prompt([{name:"language",type:"list",message:"Select a language to display / 选择显示语言",choices:["english (US)","简体中文"]}]);return{lang:e,message:wk[e]}},Ek=async e=>{const t=Zr(vk,["config","get","registry"]).stdout;if("简体中文"===e){const{registry:e}=await cn.exports.prompt([{name:"registry",type:"list",message:"选择你想使用的源",choices:["国内镜像源","当前源"]}]);return"国内镜像源"===e?"https://registry.npmmirror.com/":t}return t},Sk=((e="")=>new re(e))("vuepress-theme-hope"),jk=require("../../package.json").version;Sk.command("[dir]","Generate a new vuepress-theme-hope project").usage("yarn create vuepress-theme-hope [dir] / npm init vuepress-theme-hope [dir]").example("docs").action((async r=>{if(!r)return Sk.outputHelp();const{lang:n,message:i}=await Ok();if(r.startsWith("[")&&r.endsWith("]"))return console.log(i.dirError);console.log(i.getVersion);const o=t.resolve(process.cwd(),"package.json"),u=(e=>({"docs:build":`vuepress build ${e}`,"docs:clean-dev":`vuepress dev ${e} --clean-cache`,"docs:dev":`vuepress dev ${e}`}))(r),a=await(async()=>({vuepress:`^${await yk("vuepress")}`,"vuepress-theme-hope":`^${await yk("vuepress-theme-hope")}`}))();if(e.existsSync(o)){console.log(i.updatePackage);const t=JSON.parse(e.readFileSync(o,{encoding:"utf-8"}));mk(t,{scripts:u,devDependencies:a}),e.writeFileSync(o,`${JSON.stringify(t,null,2)}\n`,{encoding:"utf-8"})}else{console.log(i.createPackage);const t=await cn.exports.prompt([{name:"name",type:"input",message:i.nameMessage,default:"vuepress-theme-hope-template",validate:e=>!!/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u.exec(e)||i.nameError},{name:"version",type:"input",message:i.versionMessage,default:"2.0.0",validate:e=>!!/^[0-9]+\.[0-9]+\.(?:[0=9]+|[0-9]+-[a-z]+\.[0-9])$/u.exec(e)||i.versionError},{name:"description",type:"input",message:i.descriptionMessage,default:"A project of vuepress-theme-hope"},{name:"license",type:"input",message:i.licenseMessage,default:"MIT"}]),r={...t,scripts:u,devDependencies:a};e.writeFileSync(o,`${JSON.stringify(r,null,2)}\n`,{encoding:"utf-8"})}const{i18n:s,workflow:c}=await cn.exports.prompt([{name:"i18n",type:"confirm",message:i.i18nMessage,default:!1},{name:"workflow",type:"confirm",message:i.workflowMessage,default:!0}]);console.log(i.template);const l=s?"i18n":"简体中文"===n?"zh-CN":"en-US";var f,d;if(f=t.resolve(__dirname,"../template",l),d=t.resolve(process.cwd(),r),e.statSync(f).isDirectory()?_k(f,d):e.statSync(f).isFile()&&Dk(f,d),c){const i=t.resolve(process.cwd(),".github/workflows");gk(i),e.writeFileSync(t.resolve(i,"deploy-docs.yml"),((e,r)=>`\nname: ${"简体中文"===r?"部署文档":"Deploy Docs"}\n\non:\n push:\n branches:\n # ${"简体中文"===r?"确保这是你正在使用的分支名称":"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 # ${"简体中文"===r?"如果你文档需要 Git 子模块,取消注释下一行":"if your docs needs submodules, uncomment the following line"}\n # submodules: true\n\n - uses: actions/cache@v3\n id: node-modules\n with:\n path: node_modules/\n key: \${{ runner.os }}-node-modules-\${{ hashFiles('${"yarn"===vk?"yarn.lock":"package-lock.json"}') }}\n restore-keys: |\n \${{ runner.os }}-node-modules-\n\n - name: ${"简体中文"===r?"安装依赖":"Install Deps"}\n if: steps.node-modules.outputs.cache-hit != 'true'\n run: ${"yarn"===vk?"yarn install --frozen-lockfile":"npm install"}\n\n - name: ${"简体中文"===r?"构建文档":"Build Docs"}\n env:\n NODE_OPTIONS: --max_old_space_size=4096\n run: ${vk} run docs:build\n\n - name: ${"简体中文"===r?"部署文档":"Deploy Docs"}\n uses: JamesIves/github-pages-deploy-action@v4\n with:\n # ${"简体中文"===r?"这是文档部署到的分支名称":"This is the branch where the docs are deployed to"}\n branch: gh-pages\n folder: ${t.join(e,".vuepress/dist").replace(/\\/g,"/")}\n\n`)(r,n),{encoding:"utf-8"})}const p=t.resolve(process.cwd(),".gitignore"),h=e.existsSync(p)?e.readFileSync(p,{encoding:"utf-8"}):"";e.writeFileSync(p,`${h}${(e=>`\nnode_modules/\n${e}/.vuepress/.cache/\n${e}/.vuepress/.temp/\n${e}/.vuepress/dist/\n`)(r)}`,{encoding:"utf-8"});const b=await Ek(n);console.log(i.install),console.warn(i.wait),se.exports.sync(vk,["install","--registry",b],{stdout:"inherit"}),console.log(i.success);const{choise:v}=await cn.exports.prompt([{name:"choise",type:"confirm",message:i.devServerAsk,default:!0}]);v?(console.log(i.devServer),await se.exports(vk,["run","docs:dev"],{stdout:"inherit"})):console.log(i.hint)})),Sk.help((()=>[{title:"yarn create vuepress-theme-hope [dir] / npm init vuepress-theme-hope [dir]",body:"Create a vuepress-theme-hope template in [dir]"}])),Sk.version(jk),Sk.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vuepress-theme-hope",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.43",
|
|
4
4
|
"description": "Create vuepress-theme-hope demo project helper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"create",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"execa": "^5.1.1",
|
|
42
42
|
"inquirer": "^8.2.2"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "aa55c0366aeed32d92f5fd4d90157fd48fb5dcbe"
|
|
45
45
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { defineSidebarConfig } from "vuepress-theme-hope";
|
|
2
2
|
|
|
3
3
|
export default defineSidebarConfig([
|
|
4
|
-
"",
|
|
5
|
-
"home",
|
|
6
|
-
"slide",
|
|
4
|
+
"/",
|
|
5
|
+
"/home",
|
|
6
|
+
"/slide",
|
|
7
7
|
{
|
|
8
8
|
icon: "creative",
|
|
9
9
|
text: "Guide",
|
|
10
|
-
prefix: "guide/",
|
|
11
|
-
link: "guide/",
|
|
10
|
+
prefix: "/guide/",
|
|
11
|
+
link: "/guide/",
|
|
12
12
|
children: "structure",
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
text: "Articles",
|
|
16
16
|
icon: "note",
|
|
17
|
-
prefix: "posts/",
|
|
17
|
+
prefix: "/posts/",
|
|
18
18
|
children: [
|
|
19
19
|
{
|
|
20
20
|
text: "Articles 1-4",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const typeMap = {"article":{"/":{"path":"/article/","keys":["v-4eaf9f84","v-
|
|
1
|
+
export const typeMap = {"article":{"/":{"path":"/article/","keys":["v-4eaf9f84","v-5deafbd7","v-5c362338","v-5a814a99","v-7beb5be1","v-0f7612e9","v-0dc13a4a","v-0c0c61ab","v-0a57890c","v-08a2b06d","v-06edd7ce","v-0538ff2f","v-03842690","v-0e503981","v-4c863446","v-bf720700","v-0978b044","v-fffb8e28"]}},"encrypted":{"/":{"path":"/encrypted/","keys":["v-bf720700"]}},"slide":{"/":{"path":"/slides/","keys":["v-0e503981"]}},"star":{"/":{"path":"/star/","keys":["v-4eaf9f84","v-5deafbd7","v-0c0c61ab","v-0538ff2f"]}},"timeline":{"/":{"path":"/timeline/","keys":["v-5deafbd7","v-5c362338","v-5a814a99","v-7beb5be1","v-0f7612e9","v-0dc13a4a","v-0c0c61ab","v-0a57890c","v-08a2b06d","v-06edd7ce","v-0538ff2f","v-03842690","v-4eaf9f84"]}}}
|
|
2
2
|
|
|
3
3
|
if (import.meta.webpackHot) {
|
|
4
4
|
import.meta.webpackHot.accept()
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import clientAppRootComponent0 from 'C:/projects/vuepress-theme-hope/packages/components/lib/client/root-components/BackToTop.js'
|
|
2
|
-
import clientAppRootComponent1 from 'C:/projects/vuepress-theme-hope/packages/photo-swipe/lib/client/root-components/ImageViewer.js'
|
|
3
2
|
|
|
4
3
|
export const clientAppRootComponents = [
|
|
5
4
|
clientAppRootComponent0,
|
|
6
|
-
clientAppRootComponent1,
|
|
7
5
|
]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import clientAppSetup0 from 'C:/projects/vuepress-theme-hope/node_modules/@vuepress/plugin-active-header-links/lib/client/clientAppSetup.js'
|
|
2
2
|
import clientAppSetup1 from 'C:/projects/vuepress-theme-hope/node_modules/@vuepress/plugin-nprogress/lib/client/clientAppSetup.js'
|
|
3
3
|
import clientAppSetup2 from 'C:/projects/vuepress-theme-hope/packages/copy-code2/lib/client/appSetup.js'
|
|
4
|
-
import clientAppSetup3 from 'C:/projects/vuepress-theme-hope/packages/
|
|
5
|
-
import clientAppSetup4 from 'C:/projects/vuepress-theme-hope/packages/theme/lib/client/module/
|
|
6
|
-
import clientAppSetup5 from 'C:/projects/vuepress-theme-hope/packages/theme/lib/client/module/
|
|
4
|
+
import clientAppSetup3 from 'C:/projects/vuepress-theme-hope/packages/photo-swipe/lib/client/appSetup.js'
|
|
5
|
+
import clientAppSetup4 from 'C:/projects/vuepress-theme-hope/packages/theme/lib/client/module/blog/appSetup.js'
|
|
6
|
+
import clientAppSetup5 from 'C:/projects/vuepress-theme-hope/packages/theme/lib/client/module/outlook/appSetup.js'
|
|
7
|
+
import clientAppSetup6 from 'C:/projects/vuepress-theme-hope/packages/theme/lib/client/module/sidebar/appSetup.js'
|
|
7
8
|
|
|
8
9
|
export const clientAppSetups = [
|
|
9
10
|
clientAppSetup0,
|
|
@@ -12,4 +13,5 @@ export const clientAppSetups = [
|
|
|
12
13
|
clientAppSetup3,
|
|
13
14
|
clientAppSetup4,
|
|
14
15
|
clientAppSetup5,
|
|
16
|
+
clientAppSetup6,
|
|
15
17
|
]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineAsyncComponent } from 'vue'
|
|
2
2
|
|
|
3
3
|
export const layoutComponents = {
|
|
4
|
-
"404": defineAsyncComponent(() => import(
|
|
5
|
-
"Layout": defineAsyncComponent(() => import(
|
|
6
|
-
"Slide": defineAsyncComponent(() => import(
|
|
7
|
-
"Blog": defineAsyncComponent(() => import(
|
|
4
|
+
"404": defineAsyncComponent(() => import("C:/projects/vuepress-theme-hope/packages/theme/lib/client/layouts/404.js")),
|
|
5
|
+
"Layout": defineAsyncComponent(() => import("C:/projects/vuepress-theme-hope/packages/theme/lib/client/layouts/Layout.js")),
|
|
6
|
+
"Slide": defineAsyncComponent(() => import("vuepress-plugin-md-enhance/lib/client/SlidePage.js")),
|
|
7
|
+
"Blog": defineAsyncComponent(() => import("C:/projects/vuepress-theme-hope/packages/theme/lib/client/module/blog/layouts/Blog.js")),
|
|
8
8
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Vuepress } from '@vuepress/client/lib/components/Vuepress'
|
|
2
2
|
|
|
3
3
|
const routeItems = [
|
|
4
|
-
["v-79fdd481","/home.html",{"title":"项目主页","icon":"home","type":"home","readingTime":{"minutes":0.23,"words":68},"excerpt":"这是普通主页的案例。你可以在这里放置你的主体内容。 想要使用此布局,你需要在页面 front matter 中设置 home: true。 配置项的相关说明详见 项目主页配置。"
|
|
5
|
-
["v-8daa1a0e","/",{"title":"博客主页","icon":"home","type":"home","readingTime":{"minutes":0.17,"words":50},"excerpt":"这是一个博客主页。 要使用此布局,你应该在页面前端设置 layout: Blog 和 home: true。 相关配置文档请见 博客主页。"
|
|
6
|
-
["v-0e503981","/slide.html",{"title":"幻灯片页","icon":"slides","type":"slide","readingTime":{"minutes":4.47,"words":1342},"excerpt":"@slidestart 幻灯片演示 一个简单的幻灯片演示与各种小贴士。 \" 作者 Mr.Hope. 请滚动鼠标滚轮进入下一页\" --- 标注幻灯片 👇 -- 标注幻灯片 使用 --- 标注水平幻灯片 在水平幻灯片中使用 -- 分割垂直幻灯片 使用 `` 在幻灯片上添加属性 使用 `` 在前一个 HTML 元素上添加属性 --- Markdown 你可以在幻"
|
|
7
|
-
["v-4c863446","/guide/disable.html",{"title":"组件禁用","icon":"config","type":"article","readingTime":{"minutes":0.25,"words":74},"excerpt":"<p>你可以通过设置页面的 Frontmatter,在页面禁用一些功能。</p>\n","
|
|
8
|
-
["v-bf720700","/guide/encrypt.html",{"title":"密码加密的文章","icon":"lock","type":"article","readingTime":{"minutes":0.48,"words":144},"excerpt":"密码加密的文章 实际的文章内容。 段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字。 段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字","
|
|
9
|
-
["v-0978b044","/guide/markdown.html",{"title":"Markdown 增强","icon":"markdown","type":"article","readingTime":{"minutes":2.92,"words":875},"excerpt":"<p>VuePress 的每个文档页面都是由 Markdown 渲染而成。所以你需要通过在相应路径创建编写 Markdown 建立你的文档或博客页面。</p>\n","
|
|
4
|
+
["v-79fdd481","/home.html",{"title":"项目主页","icon":"home","type":"home","readingTime":{"minutes":0.23,"words":68},"excerpt":"这是普通主页的案例。你可以在这里放置你的主体内容。 想要使用此布局,你需要在页面 front matter 中设置 home: true。 配置项的相关说明详见 项目主页配置。"},["/home","/home.md"]],
|
|
5
|
+
["v-8daa1a0e","/",{"title":"博客主页","icon":"home","type":"home","readingTime":{"minutes":0.17,"words":50},"excerpt":"这是一个博客主页。 要使用此布局,你应该在页面前端设置 layout: Blog 和 home: true。 相关配置文档请见 博客主页。"},["/index.html","/README.md"]],
|
|
6
|
+
["v-0e503981","/slide.html",{"title":"幻灯片页","icon":"slides","type":"slide","readingTime":{"minutes":4.47,"words":1342},"excerpt":"@slidestart 幻灯片演示 一个简单的幻灯片演示与各种小贴士。 \" 作者 Mr.Hope. 请滚动鼠标滚轮进入下一页\" --- 标注幻灯片 👇 -- 标注幻灯片 使用 --- 标注水平幻灯片 在水平幻灯片中使用 -- 分割垂直幻灯片 使用 `` 在幻灯片上添加属性 使用 `` 在前一个 HTML 元素上添加属性 --- Markdown 你可以在幻"},["/slide","/slide.md"]],
|
|
7
|
+
["v-4c863446","/guide/disable.html",{"title":"组件禁用","icon":"config","type":"article","readingTime":{"minutes":0.25,"words":74},"excerpt":"<p>你可以通过设置页面的 Frontmatter,在页面禁用一些功能。</p>\n","category":["使用指南"],"tag":["禁用"]},["/guide/disable","/guide/disable.md"]],
|
|
8
|
+
["v-bf720700","/guide/encrypt.html",{"title":"密码加密的文章","icon":"lock","type":"article","readingTime":{"minutes":0.48,"words":144},"excerpt":"密码加密的文章 实际的文章内容。 段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字。 段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字","category":["使用指南"],"tag":["文章加密"],"isEncrypted":true},["/guide/encrypt","/guide/encrypt.md"]],
|
|
9
|
+
["v-0978b044","/guide/markdown.html",{"title":"Markdown 增强","icon":"markdown","type":"article","readingTime":{"minutes":2.92,"words":875},"excerpt":"<p>VuePress 的每个文档页面都是由 Markdown 渲染而成。所以你需要通过在相应路径创建编写 Markdown 建立你的文档或博客页面。</p>\n","category":["使用指南"],"tag":["markdown"]},["/guide/markdown","/guide/markdown.md"]],
|
|
10
10
|
["v-4eaf9f84","/guide/page.html",{"title":"页面配置","icon":"page","type":"article","readingTime":{"minutes":0.65,"words":194},"excerpt":"<p><code>more</code> 注释之前的内容被视为文章摘要。</p>\n","author":"Ms.Hope","date":"2020-01-01T00:00:00.000Z","category":["使用指南"],"tag":["页面配置","使用指南"],"sticky":true,"star":true},["/guide/page","/guide/page.md"]],
|
|
11
|
-
["v-fffb8e28","/guide/",{"title":"主要功能与配置演示","icon":"creative","type":"article","readingTime":{"minutes":0.09,"words":28},"excerpt":"主要功能与配置演示 页面展示; Markdown 展示; 禁用展示; 加密展示;","
|
|
11
|
+
["v-fffb8e28","/guide/",{"title":"主要功能与配置演示","icon":"creative","type":"article","readingTime":{"minutes":0.09,"words":28},"excerpt":"主要功能与配置演示 页面展示; Markdown 展示; 禁用展示; 加密展示;","category":["使用指南"]},["/guide/index.html","/guide/README.md"]],
|
|
12
12
|
["v-5a814a99","/posts/article10.html",{"title":"文章 10","icon":"edit","type":"article","readingTime":{"minutes":0.06,"words":19},"excerpt":"文章 10 标题 2 这里是内容。 标题 3 这里是内容。","date":"2022-01-10T00:00:00.000Z","category":["CategoryA","CategoryB"],"tag":["tag A","tag B"]},["/posts/article10","/posts/article10.md"]],
|
|
13
13
|
["v-5c362338","/posts/article11.html",{"title":"文章 11","icon":"edit","type":"article","readingTime":{"minutes":0.06,"words":19},"excerpt":"文章 11 标题 2 这里是内容。 标题 3 这里是内容。","date":"2022-01-11T00:00:00.000Z","category":["CategoryA","CategoryB"],"tag":["tag A","tag B"]},["/posts/article11","/posts/article11.md"]],
|
|
14
14
|
["v-5deafbd7","/posts/article12.html",{"title":"文章 12","icon":"edit","type":"article","readingTime":{"minutes":0.06,"words":19},"excerpt":"文章 12 标题 2 这里是内容。 标题 3 这里是内容。","date":"2022-01-12T00:00:00.000Z","category":["CategoryA","CategoryB"],"tag":["tag A","tag B"],"star":true},["/posts/article12","/posts/article12.md"]],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export const siteData = {
|
|
2
2
|
"base": "/",
|
|
3
|
-
"lang": "
|
|
4
|
-
"title": "",
|
|
5
|
-
"description": "",
|
|
3
|
+
"lang": "zh-CN",
|
|
4
|
+
"title": "主题演示",
|
|
5
|
+
"description": "vuepress-theme-hope 的演示",
|
|
6
6
|
"head": [
|
|
7
7
|
[
|
|
8
8
|
"link",
|
|
@@ -12,13 +12,7 @@ export const siteData = {
|
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
],
|
|
15
|
-
"locales": {
|
|
16
|
-
"/": {
|
|
17
|
-
"lang": "zh-CN",
|
|
18
|
-
"title": "主题演示",
|
|
19
|
-
"description": "vuepress-theme-hope 的演示"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
15
|
+
"locales": {}
|
|
22
16
|
}
|
|
23
17
|
|
|
24
18
|
if (import.meta.webpackHot) {
|
|
@@ -35,9 +35,10 @@ export const themeData = {
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"encrypt": {
|
|
38
|
+
"global": false,
|
|
38
39
|
"config": {
|
|
39
40
|
"/guide/encrypt.html": [
|
|
40
|
-
"$2a$10$
|
|
41
|
+
"$2a$10$59pmZef4sPs8udYi.gyfzusPKEy81OqFWRyy/Ck3F5TiIDUWJVKym"
|
|
41
42
|
]
|
|
42
43
|
}
|
|
43
44
|
},
|
|
@@ -52,28 +53,28 @@ export const themeData = {
|
|
|
52
53
|
"purple": "#8e44ad"
|
|
53
54
|
},
|
|
54
55
|
"fullscreen": true,
|
|
55
|
-
"hostname": "https://vuepress-theme-hope-v2-demo.mrhope.site",
|
|
56
56
|
"locales": {
|
|
57
57
|
"/": {
|
|
58
|
+
"blog": {},
|
|
58
59
|
"repoDisplay": true,
|
|
59
60
|
"navbarIcon": true,
|
|
60
61
|
"navbarAutoHide": "mobile",
|
|
61
62
|
"hideSiteNameonMobile": true,
|
|
62
63
|
"sidebar": [
|
|
63
|
-
"",
|
|
64
|
-
"home",
|
|
65
|
-
"slide",
|
|
64
|
+
"/",
|
|
65
|
+
"/home",
|
|
66
|
+
"/slide",
|
|
66
67
|
{
|
|
67
68
|
"text": "如何使用",
|
|
68
69
|
"icon": "creative",
|
|
69
|
-
"prefix": "guide/",
|
|
70
|
-
"link": "guide/",
|
|
70
|
+
"prefix": "/guide/",
|
|
71
|
+
"link": "/guide/",
|
|
71
72
|
"children": "structure"
|
|
72
73
|
},
|
|
73
74
|
{
|
|
74
75
|
"text": "文章",
|
|
75
76
|
"icon": "note",
|
|
76
|
-
"prefix": "posts/",
|
|
77
|
+
"prefix": "/posts/",
|
|
77
78
|
"children": [
|
|
78
79
|
{
|
|
79
80
|
"text": "文章 1-4",
|
|
@@ -119,13 +120,13 @@ export const themeData = {
|
|
|
119
120
|
}
|
|
120
121
|
],
|
|
121
122
|
"sidebarIcon": true,
|
|
122
|
-
"
|
|
123
|
+
"headerDepth": 2,
|
|
123
124
|
"author": {
|
|
124
125
|
"name": "Mr.Hope",
|
|
125
126
|
"url": "https://mrhope.site"
|
|
126
127
|
},
|
|
127
128
|
"logo": "/logo.svg",
|
|
128
|
-
"repo": "
|
|
129
|
+
"repo": "vuepress-theme-hope/vuepress-theme-hope",
|
|
129
130
|
"docsDir": "demo/src",
|
|
130
131
|
"navbar": [
|
|
131
132
|
"/",
|
|
@@ -207,41 +208,6 @@ export const themeData = {
|
|
|
207
208
|
"Tag",
|
|
208
209
|
"ReadingTime"
|
|
209
210
|
],
|
|
210
|
-
"blog": {
|
|
211
|
-
"description": "一个前端开发者",
|
|
212
|
-
"intro": "/intro.html",
|
|
213
|
-
"medias": {
|
|
214
|
-
"Baidu": "https://example.com",
|
|
215
|
-
"Bitbucket": "https://example.com",
|
|
216
|
-
"Dingding": "https://example.com",
|
|
217
|
-
"Discord": "https://example.com",
|
|
218
|
-
"Dribbble": "https://example.com",
|
|
219
|
-
"Email": "https://example.com",
|
|
220
|
-
"Evernote": "https://example.com",
|
|
221
|
-
"Facebook": "https://example.com",
|
|
222
|
-
"Flipboard": "https://example.com",
|
|
223
|
-
"Gitee": "https://example.com",
|
|
224
|
-
"GitHub": "https://example.com",
|
|
225
|
-
"Gitlab": "https://example.com",
|
|
226
|
-
"Gmail": "https://example.com",
|
|
227
|
-
"Instagram": "https://example.com",
|
|
228
|
-
"Lines": "https://example.com",
|
|
229
|
-
"Linkedin": "https://example.com",
|
|
230
|
-
"Pinterest": "https://example.com",
|
|
231
|
-
"Pocket": "https://example.com",
|
|
232
|
-
"QQ": "https://example.com",
|
|
233
|
-
"Qzone": "https://example.com",
|
|
234
|
-
"Reddit": "https://example.com",
|
|
235
|
-
"Rss": "https://example.com",
|
|
236
|
-
"Steam": "https://example.com",
|
|
237
|
-
"Twitter": "https://example.com",
|
|
238
|
-
"Wechat": "https://example.com",
|
|
239
|
-
"Weibo": "https://example.com",
|
|
240
|
-
"Whatsapp": "https://example.com",
|
|
241
|
-
"Youtube": "https://example.com",
|
|
242
|
-
"Zhihu": "https://example.com"
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
211
|
"lang": "zh-CN",
|
|
246
212
|
"navbarLocales": {
|
|
247
213
|
"langName": "简体中文",
|
|
@@ -268,6 +234,13 @@ export const themeData = {
|
|
|
268
234
|
"slides": "幻灯片",
|
|
269
235
|
"encrypt": "加密"
|
|
270
236
|
},
|
|
237
|
+
"paginationLocales": {
|
|
238
|
+
"prev": "上一页",
|
|
239
|
+
"next": "下一页",
|
|
240
|
+
"navigate": "跳转到",
|
|
241
|
+
"action": "前往",
|
|
242
|
+
"errorText": "请输入 1 到 $page 之前的页码!"
|
|
243
|
+
},
|
|
271
244
|
"outlookLocales": {
|
|
272
245
|
"themeColor": "主题色",
|
|
273
246
|
"darkmode": "外观",
|
|
@@ -286,7 +259,8 @@ export const themeData = {
|
|
|
286
259
|
],
|
|
287
260
|
"back": "返回上一页",
|
|
288
261
|
"home": "带我回家"
|
|
289
|
-
}
|
|
262
|
+
},
|
|
263
|
+
"tocLocales": "此页内容"
|
|
290
264
|
}
|
|
291
265
|
}
|
|
292
266
|
}
|
|
@@ -73,22 +73,6 @@ export const data = {
|
|
|
73
73
|
},
|
|
74
74
|
"excerpt": "<p>你可以通过设置页面的 Frontmatter,在页面禁用一些功能。</p>\n",
|
|
75
75
|
"headers": [],
|
|
76
|
-
"git": {
|
|
77
|
-
"createdTime": 1645179666000,
|
|
78
|
-
"updatedTime": 1646994488000,
|
|
79
|
-
"contributors": [
|
|
80
|
-
{
|
|
81
|
-
"name": "Mr.Hope",
|
|
82
|
-
"email": "zhangbowang1998@gmail.com",
|
|
83
|
-
"commits": 2
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"name": "Mr.Hope",
|
|
87
|
-
"email": "mister-hope@outlook.com",
|
|
88
|
-
"commits": 1
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
76
|
"readingTime": {
|
|
93
77
|
"minutes": 0.25,
|
|
94
78
|
"words": 74
|
|
@@ -59,17 +59,6 @@ export const data = {
|
|
|
59
59
|
},
|
|
60
60
|
"excerpt": "",
|
|
61
61
|
"headers": [],
|
|
62
|
-
"git": {
|
|
63
|
-
"createdTime": 1645179666000,
|
|
64
|
-
"updatedTime": 1645179666000,
|
|
65
|
-
"contributors": [
|
|
66
|
-
{
|
|
67
|
-
"name": "Mr.Hope",
|
|
68
|
-
"email": "zhangbowang1998@gmail.com",
|
|
69
|
-
"commits": 1
|
|
70
|
-
}
|
|
71
|
-
]
|
|
72
|
-
},
|
|
73
62
|
"readingTime": {
|
|
74
63
|
"minutes": 0.48,
|
|
75
64
|
"words": 144
|
|
@@ -50,22 +50,6 @@ export const data = {
|
|
|
50
50
|
},
|
|
51
51
|
"excerpt": "",
|
|
52
52
|
"headers": [],
|
|
53
|
-
"git": {
|
|
54
|
-
"createdTime": 1645179666000,
|
|
55
|
-
"updatedTime": 1646994488000,
|
|
56
|
-
"contributors": [
|
|
57
|
-
{
|
|
58
|
-
"name": "Mr.Hope",
|
|
59
|
-
"email": "mister-hope@outlook.com",
|
|
60
|
-
"commits": 1
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"name": "Mr.Hope",
|
|
64
|
-
"email": "zhangbowang1998@gmail.com",
|
|
65
|
-
"commits": 1
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
53
|
"readingTime": {
|
|
70
54
|
"minutes": 0.09,
|
|
71
55
|
"words": 28
|
|
@@ -137,14 +137,13 @@ export const data = {
|
|
|
137
137
|
"title": "流程图",
|
|
138
138
|
"slug": "流程图",
|
|
139
139
|
"children": []
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
"children": [
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"level": 3,
|
|
143
|
+
"title": "Mermaid",
|
|
144
|
+
"slug": "mermaid",
|
|
145
|
+
"children": []
|
|
146
|
+
},
|
|
148
147
|
{
|
|
149
148
|
"level": 3,
|
|
150
149
|
"title": "Tex 语法",
|
|
@@ -166,22 +165,6 @@ export const data = {
|
|
|
166
165
|
]
|
|
167
166
|
}
|
|
168
167
|
],
|
|
169
|
-
"git": {
|
|
170
|
-
"createdTime": 1645179666000,
|
|
171
|
-
"updatedTime": 1647092983000,
|
|
172
|
-
"contributors": [
|
|
173
|
-
{
|
|
174
|
-
"name": "Mr.Hope",
|
|
175
|
-
"email": "zhangbowang1998@gmail.com",
|
|
176
|
-
"commits": 3
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"name": "Mr.Hope",
|
|
180
|
-
"email": "mister-hope@outlook.com",
|
|
181
|
-
"commits": 1
|
|
182
|
-
}
|
|
183
|
-
]
|
|
184
|
-
},
|
|
185
168
|
"readingTime": {
|
|
186
169
|
"minutes": 2.92,
|
|
187
170
|
"words": 875
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
<FlowChart id="flowchart-64a56eba" code="cond%3D%3Econdition%3A%20%E6%98%AF%E5%90%A6%E6%89%A7%E8%A1%8C%E6%93%8D%E4%BD%9C%3F%0Aprocess%3D%3Eoperation%3A%20%E6%93%8D%E4%BD%9C%0Ae%3D%3Eend%3A%20%E7%BB%93%E6%9D%9F%0A%0Acond(yes)-%3Eprocess-%3Ee%0Acond(no)-%3Ee%0A" preset="vue"></FlowChart><ul>
|
|
163
163
|
<li><a href="https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/flowchart.html" target="_blank" rel="noopener noreferrer">查看详情<ExternalLinkIcon/></a></li>
|
|
164
164
|
</ul>
|
|
165
|
-
<
|
|
165
|
+
<h3 id="mermaid" tabindex="-1"><a class="header-anchor" href="#mermaid" aria-hidden="true">#</a> Mermaid</h3>
|
|
166
166
|
<MermaidChart id="mermaid-64a56964" data-code="flowchart%20TB%0A%20%20%20%20c1--%3Ea2%0A%20%20%20%20subgraph%20one%0A%20%20%20%20a1--%3Ea2%0A%20%20%20%20end%0A%20%20%20%20subgraph%20two%0A%20%20%20%20b1--%3Eb2%0A%20%20%20%20end%0A%20%20%20%20subgraph%20three%0A%20%20%20%20c1--%3Ec2%0A%20%20%20%20end%0A%20%20%20%20one%20--%3E%20two%0A%20%20%20%20three%20--%3E%20two%0A%20%20%20%20two%20--%3E%20c2%0A"></MermaidChart><ul>
|
|
167
167
|
<li><a href="https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/mermaid.html" target="_blank" rel="noopener noreferrer">查看详情<ExternalLinkIcon/></a></li>
|
|
168
168
|
</ul>
|
|
@@ -107,22 +107,6 @@ export const data = {
|
|
|
107
107
|
"children": []
|
|
108
108
|
}
|
|
109
109
|
],
|
|
110
|
-
"git": {
|
|
111
|
-
"createdTime": 1645179666000,
|
|
112
|
-
"updatedTime": 1646994488000,
|
|
113
|
-
"contributors": [
|
|
114
|
-
{
|
|
115
|
-
"name": "Mr.Hope",
|
|
116
|
-
"email": "zhangbowang1998@gmail.com",
|
|
117
|
-
"commits": 2
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"name": "Mr.Hope",
|
|
121
|
-
"email": "mister-hope@outlook.com",
|
|
122
|
-
"commits": 1
|
|
123
|
-
}
|
|
124
|
-
]
|
|
125
|
-
},
|
|
126
110
|
"readingTime": {
|
|
127
111
|
"minutes": 0.65,
|
|
128
112
|
"words": 194
|
|
@@ -168,17 +168,6 @@ export const data = {
|
|
|
168
168
|
},
|
|
169
169
|
"excerpt": "",
|
|
170
170
|
"headers": [],
|
|
171
|
-
"git": {
|
|
172
|
-
"createdTime": 1645179666000,
|
|
173
|
-
"updatedTime": 1647521649000,
|
|
174
|
-
"contributors": [
|
|
175
|
-
{
|
|
176
|
-
"name": "Mr.Hope",
|
|
177
|
-
"email": "zhangbowang1998@gmail.com",
|
|
178
|
-
"commits": 6
|
|
179
|
-
}
|
|
180
|
-
]
|
|
181
|
-
},
|
|
182
171
|
"readingTime": {
|
|
183
172
|
"minutes": 0.23,
|
|
184
173
|
"words": 68
|
|
@@ -92,17 +92,6 @@ export const data = {
|
|
|
92
92
|
},
|
|
93
93
|
"excerpt": "",
|
|
94
94
|
"headers": [],
|
|
95
|
-
"git": {
|
|
96
|
-
"createdTime": 1645179666000,
|
|
97
|
-
"updatedTime": 1646881792000,
|
|
98
|
-
"contributors": [
|
|
99
|
-
{
|
|
100
|
-
"name": "Mr.Hope",
|
|
101
|
-
"email": "zhangbowang1998@gmail.com",
|
|
102
|
-
"commits": 4
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
},
|
|
106
95
|
"readingTime": {
|
|
107
96
|
"minutes": 0.17,
|
|
108
97
|
"words": 50
|
|
@@ -89,17 +89,6 @@ export const data = {
|
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
91
|
],
|
|
92
|
-
"git": {
|
|
93
|
-
"createdTime": 1645179666000,
|
|
94
|
-
"updatedTime": 1645179666000,
|
|
95
|
-
"contributors": [
|
|
96
|
-
{
|
|
97
|
-
"name": "Mr.Hope",
|
|
98
|
-
"email": "zhangbowang1998@gmail.com",
|
|
99
|
-
"commits": 1
|
|
100
|
-
}
|
|
101
|
-
]
|
|
102
|
-
},
|
|
103
92
|
"readingTime": {
|
|
104
93
|
"minutes": 0.06,
|
|
105
94
|
"words": 19
|
|
@@ -90,17 +90,6 @@ export const data = {
|
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
|
-
"git": {
|
|
94
|
-
"createdTime": 1645179666000,
|
|
95
|
-
"updatedTime": 1645179666000,
|
|
96
|
-
"contributors": [
|
|
97
|
-
{
|
|
98
|
-
"name": "Mr.Hope",
|
|
99
|
-
"email": "zhangbowang1998@gmail.com",
|
|
100
|
-
"commits": 1
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
93
|
"readingTime": {
|
|
105
94
|
"minutes": 0.06,
|
|
106
95
|
"words": 19
|
|
@@ -90,17 +90,6 @@ export const data = {
|
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
|
-
"git": {
|
|
94
|
-
"createdTime": 1645179666000,
|
|
95
|
-
"updatedTime": 1645179666000,
|
|
96
|
-
"contributors": [
|
|
97
|
-
{
|
|
98
|
-
"name": "Mr.Hope",
|
|
99
|
-
"email": "zhangbowang1998@gmail.com",
|
|
100
|
-
"commits": 1
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
93
|
"readingTime": {
|
|
105
94
|
"minutes": 0.06,
|
|
106
95
|
"words": 19
|
|
@@ -90,17 +90,6 @@ export const data = {
|
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
|
-
"git": {
|
|
94
|
-
"createdTime": 1645179666000,
|
|
95
|
-
"updatedTime": 1645179666000,
|
|
96
|
-
"contributors": [
|
|
97
|
-
{
|
|
98
|
-
"name": "Mr.Hope",
|
|
99
|
-
"email": "zhangbowang1998@gmail.com",
|
|
100
|
-
"commits": 1
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
93
|
"readingTime": {
|
|
105
94
|
"minutes": 0.06,
|
|
106
95
|
"words": 19
|
|
@@ -90,17 +90,6 @@ export const data = {
|
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
|
-
"git": {
|
|
94
|
-
"createdTime": 1645179666000,
|
|
95
|
-
"updatedTime": 1645179666000,
|
|
96
|
-
"contributors": [
|
|
97
|
-
{
|
|
98
|
-
"name": "Mr.Hope",
|
|
99
|
-
"email": "zhangbowang1998@gmail.com",
|
|
100
|
-
"commits": 1
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
93
|
"readingTime": {
|
|
105
94
|
"minutes": 0.06,
|
|
106
95
|
"words": 19
|
|
@@ -91,17 +91,6 @@ export const data = {
|
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
],
|
|
94
|
-
"git": {
|
|
95
|
-
"createdTime": 1645179666000,
|
|
96
|
-
"updatedTime": 1645179666000,
|
|
97
|
-
"contributors": [
|
|
98
|
-
{
|
|
99
|
-
"name": "Mr.Hope",
|
|
100
|
-
"email": "zhangbowang1998@gmail.com",
|
|
101
|
-
"commits": 1
|
|
102
|
-
}
|
|
103
|
-
]
|
|
104
|
-
},
|
|
105
94
|
"readingTime": {
|
|
106
95
|
"minutes": 0.06,
|
|
107
96
|
"words": 19
|
|
@@ -90,17 +90,6 @@ export const data = {
|
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
|
-
"git": {
|
|
94
|
-
"createdTime": 1645179666000,
|
|
95
|
-
"updatedTime": 1645179666000,
|
|
96
|
-
"contributors": [
|
|
97
|
-
{
|
|
98
|
-
"name": "Mr.Hope",
|
|
99
|
-
"email": "zhangbowang1998@gmail.com",
|
|
100
|
-
"commits": 1
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
93
|
"readingTime": {
|
|
105
94
|
"minutes": 0.06,
|
|
106
95
|
"words": 19
|
|
@@ -90,17 +90,6 @@ export const data = {
|
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
|
-
"git": {
|
|
94
|
-
"createdTime": 1645179666000,
|
|
95
|
-
"updatedTime": 1645179666000,
|
|
96
|
-
"contributors": [
|
|
97
|
-
{
|
|
98
|
-
"name": "Mr.Hope",
|
|
99
|
-
"email": "zhangbowang1998@gmail.com",
|
|
100
|
-
"commits": 1
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
93
|
"readingTime": {
|
|
105
94
|
"minutes": 0.06,
|
|
106
95
|
"words": 19
|
|
@@ -90,17 +90,6 @@ export const data = {
|
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
|
-
"git": {
|
|
94
|
-
"createdTime": 1645179666000,
|
|
95
|
-
"updatedTime": 1645179666000,
|
|
96
|
-
"contributors": [
|
|
97
|
-
{
|
|
98
|
-
"name": "Mr.Hope",
|
|
99
|
-
"email": "zhangbowang1998@gmail.com",
|
|
100
|
-
"commits": 1
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
93
|
"readingTime": {
|
|
105
94
|
"minutes": 0.06,
|
|
106
95
|
"words": 19
|
|
@@ -90,17 +90,6 @@ export const data = {
|
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
|
-
"git": {
|
|
94
|
-
"createdTime": 1645179666000,
|
|
95
|
-
"updatedTime": 1645179666000,
|
|
96
|
-
"contributors": [
|
|
97
|
-
{
|
|
98
|
-
"name": "Mr.Hope",
|
|
99
|
-
"email": "zhangbowang1998@gmail.com",
|
|
100
|
-
"commits": 1
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
93
|
"readingTime": {
|
|
105
94
|
"minutes": 0.06,
|
|
106
95
|
"words": 19
|
|
@@ -91,17 +91,6 @@ export const data = {
|
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
],
|
|
94
|
-
"git": {
|
|
95
|
-
"createdTime": 1645179666000,
|
|
96
|
-
"updatedTime": 1645179666000,
|
|
97
|
-
"contributors": [
|
|
98
|
-
{
|
|
99
|
-
"name": "Mr.Hope",
|
|
100
|
-
"email": "zhangbowang1998@gmail.com",
|
|
101
|
-
"commits": 1
|
|
102
|
-
}
|
|
103
|
-
]
|
|
104
|
-
},
|
|
105
94
|
"readingTime": {
|
|
106
95
|
"minutes": 0.06,
|
|
107
96
|
"words": 19
|
|
@@ -90,17 +90,6 @@ export const data = {
|
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
|
-
"git": {
|
|
94
|
-
"createdTime": 1645179666000,
|
|
95
|
-
"updatedTime": 1645179666000,
|
|
96
|
-
"contributors": [
|
|
97
|
-
{
|
|
98
|
-
"name": "Mr.Hope",
|
|
99
|
-
"email": "zhangbowang1998@gmail.com",
|
|
100
|
-
"commits": 1
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
93
|
"readingTime": {
|
|
105
94
|
"minutes": 0.06,
|
|
106
95
|
"words": 19
|
|
@@ -48,17 +48,6 @@ export const data = {
|
|
|
48
48
|
},
|
|
49
49
|
"excerpt": "",
|
|
50
50
|
"headers": [],
|
|
51
|
-
"git": {
|
|
52
|
-
"createdTime": 1645179666000,
|
|
53
|
-
"updatedTime": 1645179666000,
|
|
54
|
-
"contributors": [
|
|
55
|
-
{
|
|
56
|
-
"name": "Mr.Hope",
|
|
57
|
-
"email": "zhangbowang1998@gmail.com",
|
|
58
|
-
"commits": 1
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
51
|
"readingTime": {
|
|
63
52
|
"minutes": 4.47,
|
|
64
53
|
"words": 1342
|
|
@@ -11,9 +11,6 @@
|
|
|
11
11
|
$variables: meta.module-variables("hope-palette");
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
@debug "hope palette variables: #{meta.inspect($variables)}";
|
|
15
|
-
@debug "hope config variables: #{meta.inspect(meta.module-variables("hope-config"))}";
|
|
16
|
-
|
|
17
14
|
|
|
18
15
|
@each $name, $value in $variables {
|
|
19
16
|
$key: helper.camel-to-kebab($name);
|
|
@@ -23,8 +20,8 @@ $variables: meta.module-variables("hope-palette");
|
|
|
23
20
|
#{$key}: #{$value};
|
|
24
21
|
}
|
|
25
22
|
} @else if helper.color-islegal($value) {
|
|
26
|
-
@if meta.global-variable-exists("
|
|
27
|
-
@include helper.inject-color($key, $value, $
|
|
23
|
+
@if meta.global-variable-exists("dark-selector", $module: "hope-config") {
|
|
24
|
+
@include helper.inject-color($key, $value, $dark-selector: hope-config.$dark-selector);
|
|
28
25
|
} @else {
|
|
29
26
|
@include helper.inject-color($key, $value);
|
|
30
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const sidebarData = {"guide/":["README.md","page.md","markdown.md","disable.md","encrypt.md"]}
|
|
1
|
+
export const sidebarData = {"/guide/":["README.md","page.md","markdown.md","disable.md","encrypt.md"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
$
|
|
1
|
+
$picker: ("red": #e74c3c,"blue": #3498db,"green": #3eaf7c,"orange": #f39c12,"purple": #8e44ad);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { defineSidebarConfig } from "vuepress-theme-hope";
|
|
2
2
|
|
|
3
3
|
export default defineSidebarConfig([
|
|
4
|
-
"",
|
|
5
|
-
"home",
|
|
6
|
-
"slide",
|
|
4
|
+
"/",
|
|
5
|
+
"/home",
|
|
6
|
+
"/slide",
|
|
7
7
|
{
|
|
8
8
|
text: "如何使用",
|
|
9
9
|
icon: "creative",
|
|
10
|
-
prefix: "guide/",
|
|
11
|
-
link: "guide/",
|
|
10
|
+
prefix: "/guide/",
|
|
11
|
+
link: "/guide/",
|
|
12
12
|
children: "structure",
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
text: "文章",
|
|
16
16
|
icon: "note",
|
|
17
|
-
prefix: "posts/",
|
|
17
|
+
prefix: "/posts/",
|
|
18
18
|
children: [
|
|
19
19
|
{
|
|
20
20
|
text: "文章 1-4",
|