Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xianmin/hugo-theme-jane.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Xianmin <xianmin12@gmail.com>2018-03-26 16:42:52 +0300
committerGitHub <noreply@github.com>2018-03-26 16:42:52 +0300
commite9789cb3cc24e780d9b71670f1d405c2e9752abe (patch)
treefe68fe6984e62b90494f98437bb41cc5aab5ad36
parent11f52ab220d9b83f8bfe97c32ffcbc160b7233a0 (diff)
parent707a92c2865b5f4add8c06842121d152f6ff0536 (diff)
Merge pull request #16 from athurg/add_tencent_analytics
feat: Add support for Tencent Analytics
-rw-r--r--dev-config.toml1
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/partials/scripts.html13
3 files changed, 15 insertions, 0 deletions
diff --git a/dev-config.toml b/dev-config.toml
index dc0c676..ff7f359 100644
--- a/dev-config.toml
+++ b/dev-config.toml
@@ -83,6 +83,7 @@ copyright = "" # default: author.name ↓ # 默认为下面配
changyanAppid = "" # Changyan app id # 畅言
changyanAppkey = "" # Changyan app key
+ tencent_analytics = "" # Tencent Analytics
baidu_push = false # baidu push # 百度
baidu_analytics = "" # Baidu Analytics
baidu_verification = "" # Baidu Verification
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index f6fbca8..88e23e4 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -81,6 +81,7 @@ copyright = "" # default: author.name ↓ # 默认为下面配
changyanAppid = "" # Changyan app id # 畅言
changyanAppkey = "" # Changyan app key
+ tencent_analytics = "" # Tencent Analytics
baidu_push = false # baidu push # 百度
baidu_analytics = "" # Baidu Analytics
baidu_verification = "" # Baidu Verification
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 54b6d92..c43e9ed 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -25,6 +25,19 @@
<script async src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'></script>
{{- end }}
+{{- with .Site.Params.tencent_analytics -}}
+<script id="tencent_analytics">
+ var _hmt = _hmt || [];
+ (function() {
+ if (window.location.hostname === 'localhost') return;
+ var hm = document.createElement("script"); hm.async = true;
+ hm.src = "//tajs.qq.com/stats?sId={{.}}";
+ var s = document.getElementsByTagName("script")[0];
+ s.parentNode.insertBefore(hm, s);
+ })();
+</script>
+{{- end }}
+
{{- with .Site.Params.baidu_analytics -}}
<script id="baidu_analytics">
var _hmt = _hmt || [];