Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update valine #1701

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 4 additions & 23 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ custom_file_path:
#mixin: source/_data/mixins.styl
#style: source/_data/styles.styl


# ---------------------------------------------------------------
# Site Information Settings
# See: https://theme-next.org/docs/getting-started/
Expand Down Expand Up @@ -91,7 +90,6 @@ creative_commons:
post: false
language:


# ---------------------------------------------------------------
# Scheme Settings
# ---------------------------------------------------------------
Expand All @@ -105,7 +103,6 @@ scheme: Muse
# Dark Mode
darkmode: false


# ---------------------------------------------------------------
# Menu Settings
# ---------------------------------------------------------------
Expand All @@ -130,7 +127,6 @@ menu_settings:
icons: true
badges: false


# ---------------------------------------------------------------
# Sidebar Settings
# See: https://theme-next.org/docs/theme-settings/sidebar
Expand Down Expand Up @@ -225,7 +221,6 @@ chat:
icon: fa fa-comment # Icon name in Font Awesome, set false to disable icon.
text: Chat # Button text, change it as you wish.


# ---------------------------------------------------------------
# Post Settings
# See: https://theme-next.org/docs/theme-settings/posts
Expand Down Expand Up @@ -303,7 +298,6 @@ post_edit:
# Available values: left | right | false
post_navigation: left


# ---------------------------------------------------------------
# Custom Page Settings
# See: https://theme-next.org/docs/theme-settings/custom-pages
Expand All @@ -330,7 +324,6 @@ calendar:
singleEvents: true
maxResults: 250


# ---------------------------------------------------------------
# Misc Theme Settings
# ---------------------------------------------------------------
Expand Down Expand Up @@ -393,7 +386,6 @@ github_banner:
permalink: https://github.com/yourname
title: Follow me on GitHub


# ---------------------------------------------------------------
# Font Settings
# See: https://theme-next.org/docs/theme-settings/#Fonts-Customization
Expand Down Expand Up @@ -446,7 +438,6 @@ font:
external: true
family:


# ---------------------------------------------------------------
# SEO Settings
# ---------------------------------------------------------------
Expand Down Expand Up @@ -480,7 +471,6 @@ baidu_site_verification:
# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO.
baidu_push: false


# ---------------------------------------------------------------
# Third Party Plugins & Services Settings
# See: https://theme-next.org/docs/third-party-services/
Expand Down Expand Up @@ -554,7 +544,6 @@ quicklink:
# See: https://github.com/GoogleChromeLabs/quicklink#custom-ignore-patterns
ignores:


# ---------------------------------------------------------------
# Comments Settings
# See: https://theme-next.org/docs/third-party-services/comments
Expand Down Expand Up @@ -613,11 +602,10 @@ valine:
enable: false
appid: # Your leancloud application appid
appkey: # Your leancloud application appkey
notify: false # Mail notifier
verify: false # Verification code
placeholder: Just go go # Comment box placeholder
avatar: mm # Gravatar style
avatar: # Gravatar style
guest_info: nick,mail,link # Custom comment header
requiredFields: # Required fields
pageSize: 10 # Pagination size
language: # Language, available values: en, zh-cn
visitor: false # Article reading statistic
Expand Down Expand Up @@ -645,7 +633,6 @@ gitalk:
# Available values: en | es-ES | fr | ru | zh-CN | zh-TW
language:


# ---------------------------------------------------------------
# Post Widgets & Content Sharing Services
# See: https://theme-next.org/docs/third-party-services/post-widgets
Expand All @@ -655,14 +642,13 @@ gitalk:
# To get your ID visit https://widgetpack.com
rating:
enable: false
id: # <app_id>
color: fc6423
id: # <app_id>
color: fc6423

# AddThis Share. See: https://www.addthis.com
# Go to https://www.addthis.com/dashboard to customize your tools.
add_this_id:


# ---------------------------------------------------------------
# Statistics and Analytics
# See: https://theme-next.org/docs/third-party-services/statistics-and-analytics
Expand Down Expand Up @@ -719,7 +705,6 @@ busuanzi_count:
post_views: true
post_views_icon: fa fa-eye


# ---------------------------------------------------------------
# Search Services
# See: https://theme-next.org/docs/third-party-services/search-services
Expand Down Expand Up @@ -753,7 +738,6 @@ local_search:
# Swiftype Search API Key
swiftype_key:


# ---------------------------------------------------------------
# Chat Services
# See: https://theme-next.org/docs/third-party-services/chat-services
Expand All @@ -775,7 +759,6 @@ tidio:
enable: false
key: # Public Key, get it from dashboard. See: https://www.tidiochat.com/panel/settings/developer


# ---------------------------------------------------------------
# Tags Settings
# See: https://theme-next.org/docs/tag-plugins/
Expand Down Expand Up @@ -815,7 +798,6 @@ mermaid:
# Available themes: default | dark | forest | neutral
theme: forest


# ---------------------------------------------------------------
# Animation Settings
# ---------------------------------------------------------------
Expand Down Expand Up @@ -867,7 +849,6 @@ canvas_ribbon:
alpha: 0.6 # The transparency of the ribbon
zIndex: -1 # The display level of the ribbon


#! ---------------------------------------------------------------
#! DO NOT EDIT THE FOLLOWING SETTINGS
#! UNLESS YOU KNOW WHAT YOU ARE DOING
Expand Down
11 changes: 8 additions & 3 deletions layout/_third-party/comments/valine.swig
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,26 @@ NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
guest = guest.split(',').filter(item => {
return GUEST.includes(item);
});
const requiredFields = '{{ theme.valine.requiredFields }}'.split(',').filter(item => {
return GUEST.includes(item);
});
new Valine({
el : '#valine-comments',
verify : {{ theme.valine.verify }},
notify : {{ theme.valine.notify }},
// verify : {{ theme.valine.verify }},
// notify : {{ theme.valine.notify }},
appId : '{{ theme.valine.appid }}',
appKey : '{{ theme.valine.appkey }}',
placeholder: {{ theme.valine.placeholder | json }},
avatar : '{{ theme.valine.avatar }}',
meta : guest,
requiredFields: requiredFields,
pageSize : '{{ theme.valine.pageSize }}' || 10,
visitor : {{ theme.valine.visitor }},
lang : '{{ theme.valine.language }}' || 'zh-cn',
path : location.pathname,
recordIP : {{ theme.valine.recordIP }},
serverURLs : '{{ theme.valine.serverURLs }}'
serverURLs : '{{ theme.valine.serverURLs }}',
enableQQ : {{ theme.valine.enableQQ }}
});
}, window.Valine);
});
Expand Down