增加百度统计

This commit is contained in:
huanqing.shao
2019-08-11 11:41:44 +08:00
parent cb38b3809f
commit 981c5db86a
3 changed files with 15 additions and 0 deletions

9
.vuepress/baidutongji.js Normal file
View File

@ -0,0 +1,9 @@
export default function installBaiduTongji () {
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?5434e5c7a3fe924c0d6c5bd6f0eae56b";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
}

View File

@ -71,11 +71,13 @@
<script>
import NavLink from '@theme/components/NavLink.vue'
import installBaiduTongji from '../baidutongji.js'
export default {
components: { NavLink },
mounted () {
window.document.title = 'Kuboard - Kubernetes 安装文档/教程/实践/管理界面'
installBaiduTongji()
},
computed: {
data () {

View File

@ -25,8 +25,12 @@
<script>
import ParentLayout from '@parent-theme/layouts/Layout.vue'
import installBaiduTongji from '../../baidutongji.js'
export default {
mounted () {
installBaiduTongji()
},
components: {
ParentLayout
},