From 2c2a019bb87ad42d4ae4be4d542baad8cc86c025 Mon Sep 17 00:00:00 2001
From: wizardforcel <562826179@qq.com>
Date: Mon, 23 Nov 2020 13:23:47 +0800
Subject: [PATCH] 2020-11-23 13:23:47
---
asset/docsify-baidu-stat.js | 13 +++++++++++++
index.html | 13 ++-----------
2 files changed, 15 insertions(+), 11 deletions(-)
create mode 100644 asset/docsify-baidu-stat.js
diff --git a/asset/docsify-baidu-stat.js b/asset/docsify-baidu-stat.js
new file mode 100644
index 0000000..811aa35
--- /dev/null
+++ b/asset/docsify-baidu-stat.js
@@ -0,0 +1,13 @@
+(function(){
+ var plugin = function(hook) {
+ hook.doneEach(function() {
+ window._hmt = window._hmt || []
+ var hm = document.createElement("script")
+ hm.src = "https://hm.baidu.com/hm.js?" + window.$docsify.bdStatId
+ document.querySelector("article").appendChild(hm)
+ })
+ }
+ var plugins = window.$docsify.plugins || []
+ plugins.push(plugin)
+ window.$docsify.plugins = plugins
+})()
\ No newline at end of file
diff --git a/index.html b/index.html
index ca58666..7969a91 100644
--- a/index.html
+++ b/index.html
@@ -13,17 +13,6 @@
-
-
-
@@ -68,6 +57,7 @@
themeColor: '#DAA520',
repo: 'apachecn/eloquent-js-3e-zh',
plugins: [window.docsPlugin],
+ bdStatId: '38525fdac4b5d4403900b943d4e7dd91',
search: {
paths: 'auto',
placeholder: '搜索',
@@ -87,5 +77,6 @@
+