This repository was archived by the owner on Dec 23, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 < div id ="app "> </ div >
2828 < script >
2929 // Set html "lang" attribute based on URL
30- var lang = location . hash . match ( / \# ( z h - c n ) / ) ;
31- console . log ( location ) ;
30+ let lang = location . hash . match ( / \# ( z h - c n ) / ) ;
31+ // console.log(location);
3232 if ( lang ) {
3333 document . documentElement . setAttribute ( "lang" , lang [ 1 ] ) ;
3434 }
3535
3636 window . $docsify = {
3737 name : "mirr.one" ,
38- elativePath : true ,
38+ relativePath : false ,
3939 coverpage : {
4040 "/" : "_coverpage.md" ,
4141 "/zh-cn" : "zh-cn/_coverpage.md" ,
4444 loadSidebar : true ,
4545 nameLink : {
4646 "/" : "#/" ,
47- "/zh-cn" : "#/zh-cn" ,
47+ "/zh-cn/ " : "#/zh-cn/ " ,
4848 } ,
4949 search : {
5050 paths : "auto" ,
6363 "(.*)/CHANGELOG" : "/CHANGELOG.md" ,
6464
6565 // prepare for gitLocalize
66- "/zh-cn/ " : "/lang_i18n/zh-CN/README.md" ,
66+ // "/zh-cn": "/lang_i18n/zh-CN/README.md",
6767 "/zh-cn/(.*)" : "/lang_i18n/zh-CN/$1" ,
6868 } ,
6969 plugins : [
7070 function ( hook , vm ) {
71- let footer = `>---
71+ const lang_i18n = [ "/" , "/zh-cn/" ] ;
72+
73+ const footer = `>---
7274## Sponsors
7375- [Fastly](https://www.fastly.com/)
7476` ;
9698
9799 let editHtml = "\n[:memo: Edit Document](" + url + ")\n" ;
98100
99- if ( vm . route . path === "/" ) {
100- return html + editHtml ;
101+ let path = vm . route . path ;
102+ // console.log(path);
103+
104+ for ( let i = 0 ; i < lang_i18n . length ; i ++ ) {
105+ if ( path === lang_i18n [ i ] ) {
106+ return html + editHtml ;
107+ }
101108 }
102109
103110 return html + editHtml + footer ;
Original file line number Diff line number Diff line change @@ -48,4 +48,4 @@ replace url
4848
4949> ** ![ WARNING] Don't download resource with multi-thread downloader, which will spend a lot of request quota.**
5050
51- ![ B2 warning] ( /_images/b2-warning.jpg )
51+ ![ B2 warning] ( .. /_images/b2-warning.jpg)
You can’t perform that action at this time.
0 commit comments