From e3d70795a93f3dcaa987c793277d12257422cbf6 Mon Sep 17 00:00:00 2001
From: D-Sketon <2055272094@qq.com>
Date: Sun, 14 Jan 2024 18:53:32 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20waline=E9=98=85=E8=AF=BB=E7=BB=9F?=
=?UTF-8?q?=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
_config.yml | 13 +++++++------
layout/_partial/after-footer.ejs | 28 +++++++++++++++-------------
layout/_partial/article.ejs | 24 ++++++++++++++++--------
package.json | 4 ----
4 files changed, 38 insertions(+), 31 deletions(-)
diff --git a/_config.yml b/_config.yml
index 3584c8d..cbf19f7 100644
--- a/_config.yml
+++ b/_config.yml
@@ -115,12 +115,12 @@ waline:
lang: zh-CN
locale: {} # https://waline.js.org/guide/features/i18n.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%AD%E8%A8%80
emoji:
- - https://unpkg.com/@waline/emojis@1.0.1/weibo
- - https://unpkg.com/@waline/emojis@1.0.1/alus
- - https://unpkg.com/@waline/emojis@1.0.1/bilibili
- - https://unpkg.com/@waline/emojis@1.0.1/qq
- - https://unpkg.com/@waline/emojis@1.0.1/tieba
- - https://unpkg.com/@waline/emojis@1.0.1/tw-emoji
+ - https://unpkg.com/@waline/emojis@1.2.0/weibo
+ - https://unpkg.com/@waline/emojis@1.2.0/alus
+ - https://unpkg.com/@waline/emojis@1.2.0/bilibili
+ - https://unpkg.com/@waline/emojis@1.2.0/qq
+ - https://unpkg.com/@waline/emojis@1.2.0/tieba
+ - https://unpkg.com/@waline/emojis@1.2.0/tw-emoji
meta:
- nick
- mail
@@ -130,6 +130,7 @@ waline:
- mail
wordLimit: 0
pageSize: 10
+ pageview: true
# https://twikoo.js.org
twikoo:
diff --git a/layout/_partial/after-footer.ejs b/layout/_partial/after-footer.ejs
index 63d9a36..f614593 100644
--- a/layout/_partial/after-footer.ejs
+++ b/layout/_partial/after-footer.ejs
@@ -105,22 +105,24 @@
<% } %>
<% if (theme.waline.enable && theme.waline.serverURL) { %>
- <%- js({src: vendorCdn(theme.vendor.js.waline)[0], 'data-pjax': true}) %>
<% } %>
diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs
index 962ce8d..0f0ba4f 100644
--- a/layout/_partial/article.ejs
+++ b/layout/_partial/article.ejs
@@ -33,14 +33,6 @@
<%= __('comment') %>
<% } %>
- <% if (theme.valine.enable && theme.valine.appId && theme.valine.appKey && theme.valine.visitor) { %>
- " class="leancloud_visitors article-visitor-link" data-flag-title="<%= post.title %>">
- 0
- <%= __('reading') %>
-
- <% } %>
<% if (post.comments && theme.twikoo.enable && theme.twikoo.envId) { %>
@@ -61,6 +53,22 @@
});
<% } %>
+ <% if (theme.valine.enable && theme.valine.appId && theme.valine.appKey && theme.valine.visitor) { %>
+ " class="leancloud_visitors article-visitor-link" data-flag-title="<%= post.title %>">
+ 0
+ <%= __('reading') %>
+
+ <% } %>
+ <% if (theme.waline.enable && theme.waline.serverURL && theme.waline.pageview) { %>
+
+ ">0
+ <%= __('reading') %>
+
+ <% } %>
<%- partial('post/tag') %>
diff --git a/package.json b/package.json
index 3c05cbb..1168bba 100644
--- a/package.json
+++ b/package.json
@@ -2,10 +2,6 @@
"name": "hexo-theme-reimu",
"version": "0.1.0-alpha",
"description": "A Hakurei Reimu style Hexo theme",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
"repository": {
"type": "git",
"url": "git+https://github.com/D-Sketon/hexo-theme-reimu.git"