💄 Update use waline pageview & add to homepage. Close #41, #42

This commit is contained in:
凡梦星尘
2022-10-29 18:15:39 +08:00
parent ac712b9277
commit 146bf52038
7 changed files with 51 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
/* Waline pageview plugin */
NexT.plugins.others.pageview = function() {
const busz = NexT.CONFIG.busuanzi;
if (busz != undefined && busz.pageview) return;
let pageview_js = undefined;
// Here can append others pageview plugin
const waline = NexT.CONFIG.waline;
if (waline != undefined && waline.cfg.pageview) {
pageview_js = NexT.utils.getCDNResource(NexT.CONFIG.page.pageview.js);
}
if (pageview_js == undefined) return;
NexT.utils.getScript(pageview_js, function(){
Waline.pageviewCount({
serverURL: waline.cfg.serverurl
});
});
}