From 047e36fa79c7d92ce1e622daa9d6218d6afce72e Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sun, 25 Nov 2018 23:37:20 +0800 Subject: [PATCH] =?UTF-8?q?leancloud=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 7 ++- layout/_partial/article.ejs | 8 ++- layout/_partial/scripts.ejs | 107 ++++++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+), 4 deletions(-) diff --git a/_config.yml b/_config.yml index ec8da2c..85ab63b 100755 --- a/_config.yml +++ b/_config.yml @@ -50,9 +50,10 @@ motto: 这是我的座右铭 # 百度统计key baidu_analytics_key: xxx - - - +# leancloud统计 +leancloud_analytics: + appId: xxx + appKey: xxx # >> 主题配置 --------------------------------------------------------------------- diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 948b997..2def1e9 100755 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -10,7 +10,13 @@ <%= date(post.date, config.date_format) %>
- + <% if (config.leancloud_analytics && config.leancloud_analytics.appId && config.leancloud_analytics.appKey) { %> + + + + <% } else { %> + + <% } %>
<%- partial('categories',{post:post}) %> diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index a9b9d09..8e75ae8 100755 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -80,3 +80,110 @@ <% } %> <% } %> <% } %> + + +<% if (config.leancloud_analytics) { %> + + + +<% } %>