Skip to content

Commit

Permalink
feat(hexo-next): realse @waline/hexo-next 1.0.3
Browse files Browse the repository at this point in the history
add libUrl config to custome cdn url
  • Loading branch information
lizheming committed Dec 18, 2020
1 parent b11fde9 commit 67653ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/hexo-next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ waline:
visitor: false # Article reading statistic
comment_count: true # If false, comment count will only be displayed in post page, not in home page
requiredFields: [] # Set required fields: [nick] | [nick, mail]
libUrl: # Set custom library cdn url
```
2 changes: 1 addition & 1 deletion packages/hexo-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@waline/hexo-next",
"version": "1.0.2",
"version": "1.0.3",
"description": "Waline comment system for NexT.",
"main": "index.js",
"repository": "lizheming/waline",
Expand Down
2 changes: 1 addition & 1 deletion packages/hexo-next/waline.njk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
NexT.utils.loadComments('#waline-comments', () => {
NexT.utils.getScript('https://cdn.jsdelivr.net/npm/@waline/client/dist/Waline.min.js', () => {
NexT.utils.getScript('{%if config.waline.libUrl %}{{config.waline.libUrl}}{%else%}https://cdn.jsdelivr.net/npm/@waline/client/dist/Waline.min.js{%endif%}', () => {
new Waline(Object.assign({{ config.waline | safedump }}, {
el: '#waline-comments',
path: {{ url_for(page.path) | replace(r/index\.html$/, '') | safedump }}
Expand Down

0 comments on commit 67653ce

Please sign in to comment.