mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Update Valine script
This commit is contained in:
parent
a4a1cdcf20
commit
a412964ab2
@ -51,7 +51,7 @@
|
||||
{%- endif %}
|
||||
|
||||
{# LeanCloud PageView #}
|
||||
{%- if theme.leancloud_visitors.enable or (theme.valine.enable and theme.valine.visitor) %}
|
||||
{%- if theme.leancloud_visitors.enable or (theme.valine and theme.valine.enable and theme.valine.visitor) %}
|
||||
<span id="{{ url_for(post.path) }}" class="post-meta-item leancloud_visitors" data-flag-title="{{ post.title }}" title="{{ __('post.views') }}">
|
||||
<span class="post-meta-item-icon">
|
||||
<i class="far fa-eye"></i>
|
||||
|
||||
@ -8,7 +8,7 @@ const { iconText } = require('./common');
|
||||
// Add comment
|
||||
hexo.extend.filter.register('theme_inject', injects => {
|
||||
const theme = hexo.theme.config;
|
||||
if (!theme.valine.enable || !theme.valine.appId || !theme.valine.appKey) return;
|
||||
if (!theme.valine || !theme.valine.enable || !theme.valine.appId || !theme.valine.appKey) return;
|
||||
|
||||
injects.comment.raw('valine', '<div class="comments" id="valine-comments"></div>', {}, {cache: true});
|
||||
|
||||
@ -19,7 +19,7 @@ hexo.extend.filter.register('theme_inject', injects => {
|
||||
// Add post_meta
|
||||
hexo.extend.filter.register('theme_inject', injects => {
|
||||
const theme = hexo.theme.config;
|
||||
if (!theme.valine.enable || !theme.valine.appId || !theme.valine.appKey) return;
|
||||
if (!theme.valine || !theme.valine.enable || !theme.valine.appId || !theme.valine.appKey) return;
|
||||
|
||||
injects.postMeta.raw('valine', `
|
||||
{% if post.comments and (is_post() or theme.valine.comment_count) %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user