-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use new api for Artalk v2.5.0+ update #7
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
{{ next_data('artalk', config.artalk, { | ||
el: '#comments', | ||
pageKey: url_for(page.path) | replace(r/index\.html$/, ''), | ||
pageTitle: page.title, | ||
locale: page.lang | default('zh-CN', true) | ||
pageTitle: page.title | ||
}) }} | ||
|
||
<link rel="stylesheet" href="{{ config.artalk.cssUrl }}"> | ||
|
@@ -17,15 +16,15 @@ | |
condition: window.Artalk | ||
})) | ||
.then(() => { | ||
new Artalk(CONFIG.artalk); | ||
Artalk.init(CONFIG.artalk); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 将 |
||
}); | ||
|
||
} else { | ||
|
||
NexT.utils.getScript(CONFIG.artalk.jsUrl, { | ||
condition: window.Artalk | ||
}).then(() => { | ||
Artalk.LoadCountWidget({ | ||
Artalk.loadCountWidget({ | ||
server: CONFIG.artalk.server, | ||
site: CONFIG.artalk.site, | ||
pvEl: '#ArtalkPV', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ artalk: | |
|
||
# Frontend resources CDN, you can set this to your preferred CDN | ||
## Reference: https://artalk.js.org/guide/frontend/install.html | ||
jsUrl: https://unpkg.com/artalk@2/dist/Artalk.js | ||
cssUrl: https://unpkg.com/artalk@2/dist/Artalk.css | ||
jsUrl: https://artalk.example.com/dist/Artalk.js | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 后端程序中包含了对应版本的前端资源文件,可保证版本一致性,但同时也推荐使用 CDN 资源加快速度。 |
||
cssUrl: https://artalk.example.com/dist/Artalk.css | ||
|
||
# Page views count | ||
pvCount: true | ||
|
@@ -27,4 +27,4 @@ artalk: | |
|
||
# Use backend to config | ||
## Reference: https://artalk.js.org/guide/backend/fe-control.html | ||
useBackendConf: false | ||
useBackendConf: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 新版 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
语言可以在侧边栏控制中心修改