mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Fix serverURLs of Valine
This commit is contained in:
parent
d51ca0e2e8
commit
9919fb5c49
@ -1,5 +1,5 @@
|
||||
# ===============================================================
|
||||
# It's recommended to use Alternate Theme Config to configure the theme
|
||||
# It's recommended to use Alternate Theme Config to configure NexT
|
||||
# Modifying this file may result in merge conflict
|
||||
# See: https://theme-next.js.org/docs/getting-started/configuration
|
||||
# ===============================================================
|
||||
@ -608,6 +608,7 @@ valine:
|
||||
enable: false
|
||||
appId: # Your leancloud application appid
|
||||
appKey: # Your leancloud application appkey
|
||||
serverURLs: # When the custom domain name is enabled, fill it in here
|
||||
placeholder: Just go go # Comment box placeholder
|
||||
avatar: mm # Gravatar style
|
||||
meta: [nick, mail, link] # Custom comment header
|
||||
@ -616,7 +617,6 @@ valine:
|
||||
visitor: false # Article reading statistic
|
||||
comment_count: true # If false, comment count will only be displayed in post page, not in home page
|
||||
recordIP: false # Whether to record the commenter IP
|
||||
serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
|
||||
enableQQ: false # Whether to enable the Nickname box to automatically get QQ Nickname and QQ Avatar
|
||||
requiredFields: [] # Set required fields: [nick] | [nick, mail]
|
||||
|
||||
|
||||
@ -76,10 +76,7 @@
|
||||
|
||||
{%- if theme.footer.powered %}
|
||||
<div class="powered-by">
|
||||
{%- set next_site = 'https://theme-next.js.org' %}
|
||||
{%- if theme.scheme !== 'Gemini' %}
|
||||
{%- set next_site = 'https://theme-next.js.org/' + theme.scheme | lower + '/' %}
|
||||
{%- endif %}
|
||||
{%- set next_site = 'https://theme-next.js.org' if theme.scheme === 'Gemini' else 'https://theme-next.js.org/' + theme.scheme | lower + '/' %}
|
||||
{{- __('footer.powered', next_url('https://hexo.io', 'Hexo', {class: 'theme-link'}) + ' & ' + next_url(next_site, 'NexT.' + theme.scheme, {class: 'theme-link'})) }}
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
||||
1
layout/_third-party/comments/valine.njk
vendored
1
layout/_third-party/comments/valine.njk
vendored
@ -4,6 +4,7 @@ NexT.utils.loadComments('#valine-comments', () => {
|
||||
new Valine(Object.assign({
|
||||
el: '#valine-comments',
|
||||
path: {{ url_for(page.path) | replace(r/index\.html$/, '') | safedump }},
|
||||
serverURLs: 'https://{{ theme.valine.appId.slice(0, 8) | lower }}.api.lncldglobal.com'
|
||||
}, {{ theme.valine | safedump }}
|
||||
));
|
||||
}, window.Valine);
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
const api_server = app_id.slice(-9) !== '-MdYXbMMI' ? server_url : `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com`;
|
||||
const api_server = app_id.slice(-9) === '-MdYXbMMI' ? `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com` : server_url;
|
||||
|
||||
if (api_server) {
|
||||
fetchData(api_server);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user