diff --git a/includes/specs/plugins.spec.js b/includes/specs/plugins.spec.js
index 27b9b5a..2b13c0f 100644
--- a/includes/specs/plugins.spec.js
+++ b/includes/specs/plugins.spec.js
@@ -64,5 +64,10 @@ module.exports = {
[type]: 'boolean',
[doc]: 'Show the copy button in the highlighted code area',
[defaultValue]: true
+ },
+ visit: {
+ [type]: 'boolean',
+ [doc]: 'Show PV/UV of blog and PV of each article',
+ [defaultValue]: false
}
};
\ No newline at end of file
diff --git a/layout/common/article.ejs b/layout/common/article.ejs
index d3149f2..7eadebb 100644
--- a/layout/common/article.ejs
+++ b/layout/common/article.ejs
@@ -41,6 +41,17 @@
<%- index && post.excerpt ? post.excerpt : post.content %>
+ <% if (!index && (has_config('plugins.visit') ? get_config('plugins.visit') : false)) { %>
+
+ <% } %>
<% if (!index && post.tags && post.tags.length) { %>
diff --git a/layout/common/footer.ejs b/layout/common/footer.ejs
index 0024963..e6ef4fc 100644
--- a/layout/common/footer.ejs
+++ b/layout/common/footer.ejs
@@ -14,6 +14,16 @@
Powered by
Hexo &
Icarus
+ <% if (has_config('plugins.visit') ? get_config('plugins.visit') : false) { %>
+
+
+ UV:0,
+
+
+ PV:0
+
+
+ <% } %>
<% if (has_config('footer.links')) { %>
diff --git a/layout/plugin/visit.ejs b/layout/plugin/visit.ejs
new file mode 100644
index 0000000..556c02b
--- /dev/null
+++ b/layout/plugin/visit.ejs
@@ -0,0 +1,5 @@
+<% if (plugin !== false) { %>
+ <% if (head) { %>
+
+ <% } %>
+<% } %>
\ No newline at end of file