Skip to content

Commit c8fa54e

Browse files
Fix config
1 parent a3bf3b8 commit c8fa54e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
const Util = require('@next-theme/utils');
66
const utils = new Util(hexo, __dirname);
77

8+
function capitalize(input) {
9+
return input.toString().charAt(0).toUpperCase() + input.toString().substr(1);
10+
}
11+
812
function iconText(icon, key, defaultValue) {
913
if (!defaultValue) {
1014
defaultValue = capitalize(key);

valine.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{%- set serverURLs = theme.valine.serverURLs or 'https://' + theme.valine.appId.slice(0, 8) | lower + '.api.lncldglobal.com' %}
1+
{%- set serverURLs = config.valine.serverURLs or 'https://' + config.valine.appId.slice(0, 8) | lower + '.api.lncldglobal.com' %}
22
<script>
33
NexT.utils.loadComments('#valine-comments', () => {
4-
NexT.utils.getScript('{{ theme.vendors.valine }}', () => {
5-
new Valine(Object.assign({{ theme.valine | safedump }}, {
4+
NexT.utils.getScript('https://cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js', () => {
5+
new Valine(Object.assign({{ config.valine | safedump }}, {
66
el: '#valine-comments',
77
path: {{ url_for(page.path) | replace(r/index\.html$/, '') | safedump }},
88
serverURLs: {{ serverURLs | safedump }}

0 commit comments

Comments
 (0)