chore: update index page
This commit is contained in:
parent
e562c4b589
commit
696b12a1b0
@ -358,6 +358,6 @@ GitHub 技术社区 [Doocs](https://github.com/doocs),致力于打造一个内
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
关注「**Doocs 开源社区**」公众号,回复 **PDF**,即可获取 [doocs/advanced-java](https://github.com/doocs/advanced-java) 项目离线 PDF 文档(283 页精华),学习更加方便!
|
关注「**Doocs 开源社区**」公众号,回复 **PDF**,即可获取 [互联网 Java 工程师进阶知识完全扫盲](https://github.com/doocs/advanced-java) 项目离线 PDF 文档(283 页精华),学习更加方便!
|
||||||
|
|
||||||

|

|
||||||
|
61
index.html
61
index.html
@ -71,15 +71,62 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
function (hook) {
|
function (hook, vm) {
|
||||||
var footer = [
|
hook.beforeEach(function (content) {
|
||||||
"<hr/>",
|
const en = vm.route.file.indexOf("README_EN") > -1;
|
||||||
"<footer>",
|
if (/githubusercontent\.com/.test(vm.route.file)) {
|
||||||
'<span>Copyright © 2018-2021 <a href="https://github.com/doocs" target="_blank">Doocs</a>. All rights reserved.',
|
url = vm.route.file
|
||||||
"</footer>",
|
.replace("raw.githubusercontent.com", "github.com")
|
||||||
].join("");
|
.replace(/\/main/, "/blob/main");
|
||||||
|
} else {
|
||||||
|
url =
|
||||||
|
"https://github.com/doocs/source-code-hunter/blob/main/" +
|
||||||
|
vm.route.file;
|
||||||
|
}
|
||||||
|
|
||||||
|
const github = `[GitHub](${url})`;
|
||||||
|
const gitee = `[Gitee](${url.replace("github", "gitee")})`;
|
||||||
|
|
||||||
|
const editHtml = en
|
||||||
|
? `:memo: Edit on ${github} / ${gitee}\n`
|
||||||
|
: `:memo: 在 ${github} / ${gitee} 编辑\n`;
|
||||||
|
|
||||||
|
if (vm.route.path == "/") {
|
||||||
|
return editHtml + content;
|
||||||
|
}
|
||||||
|
const subscription = `
|
||||||
|
## 公众号
|
||||||
|
|
||||||
|
[Doocs](https://github.com/doocs) 技术社区旗下唯一公众号「**Doocs开源社区**」,欢迎扫码关注,**专注分享技术领域相关知识及业内最新资讯**。当然,也可以加我个人微信(备注:GitHub),拉你进技术交流群。
|
||||||
|
|
||||||
|
关注「**Doocs 开源社区**」公众号,回复 **PDF**,即可获取 [互联网 Java 工程师进阶知识完全扫盲](https://github.com/doocs/advanced-java) 项目离线 PDF 文档(283 页精华),学习更加方便!
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td align="center" style="width: 200px;">
|
||||||
|
<a href="https://github.com/doocs">
|
||||||
|
<img src="./images/qrcode-for-doocs.jpg" style="width: 400px;"><br>
|
||||||
|
<sub>公众平台</sub>
|
||||||
|
</a><br>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="width: 200px;">
|
||||||
|
<a href="https://github.com/yanglbme">
|
||||||
|
<img src="./images/qrcode-for-yanglbme.jpg" style="width: 400px;"><br>
|
||||||
|
<sub>个人微信</sub>
|
||||||
|
</a><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
`;
|
||||||
|
return editHtml + content + `\n` + subscription;
|
||||||
|
});
|
||||||
|
|
||||||
hook.afterEach(function (html) {
|
hook.afterEach(function (html) {
|
||||||
|
const footer = [
|
||||||
|
"<footer>",
|
||||||
|
'<span>Copyright © 2018-2021 <a href="https://github.com/doocs" target="_blank">Doocs</a>. All rights reserved.',
|
||||||
|
"</footer>",
|
||||||
|
].join("");
|
||||||
return html + footer;
|
return html + footer;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user