chore: update index page

pull/95/head
yanglbme 4 years ago
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 页精华),学习更加方便!
![](./images/pdf.png) ![](./images/pdf.png)

@ -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;
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace("raw.githubusercontent.com", "github.com")
.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) {
const footer = [
"<footer>", "<footer>",
'<span>Copyright © 2018-2021 <a href="https://github.com/doocs" target="_blank">Doocs</a>. All rights reserved.', '<span>Copyright © 2018-2021 <a href="https://github.com/doocs" target="_blank">Doocs</a>. All rights reserved.',
"</footer>", "</footer>",
].join(""); ].join("");
hook.afterEach(function (html) {
return html + footer; return html + footer;
}); });
}, },

Loading…
Cancel
Save