Skip to content
This repository was archived by the owner on Dec 23, 2022. It is now read-only.

Commit aa8b322

Browse files
committed
fix(footer): remove duplicate Sponsors list on home
1 parent f30aed5 commit aa8b322

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

index.html

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
<div id="app"></div>
2828
<script>
2929
// Set html "lang" attribute based on URL
30-
var lang = location.hash.match(/\#(zh-cn)/);
31-
console.log(location);
30+
let lang = location.hash.match(/\#(zh-cn)/);
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",
@@ -44,7 +44,7 @@
4444
loadSidebar: true,
4545
nameLink: {
4646
"/": "#/",
47-
"/zh-cn": "#/zh-cn",
47+
"/zh-cn/": "#/zh-cn/",
4848
},
4949
search: {
5050
paths: "auto",
@@ -63,12 +63,14 @@
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
`;
@@ -96,8 +98,13 @@
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;

media/backblaze-b2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)