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) { %> + + + +<% } %>