-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add gitalk comment system #464
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f324c43
add gitalk comment system
jactor-sue 1a87fc3
update cdn for gitalk
jactor-sue 44ddb56
update vendors config and fix typos
jactor-sue 3b598a5
remove local md5.js
jactor-sue f3952ff
Merge branch 'master' into master
jactor-sue 8175b46
update cdn source
jactor-sue f51cd84
Revert "update cdn source"
jactor-sue bb48d51
update cdn source
jactor-sue f548a06
Merge branch 'master' of https://github.com/Jactor-Sue/hexo-theme-next
jactor-sue 3d2ec8e
update md5 cdn
jactor-sue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -541,20 +541,13 @@ gitment: | |
# Demo: https://gitalk.github.io | ||
# Reference: https://asdfv1929.github.io/2018/01/20/gitalk/, https://liujunzhou.cn/2018/8/10/gitalk-error/#more | ||
gitalk: | ||
enable: true | ||
enable: false | ||
github_id: # Github repo owner | ||
repo: # Repository name to store issues. | ||
client_id: # Github Application Client ID | ||
client_secret: # Github Application Client Secret | ||
admin_user: # GitHub repo owner and collaborators, only these guys can initialize github issues | ||
distraction_free_mode: true # Facebook-like distraction free mode | ||
## CDN for Gitalk | ||
gitalk_cdn_prefix: https://unpkg.com/gitalk/dist/ | ||
# gitalk_cdn_prefix: https://cdn.bootcss.com/gitalk/1.4.0/ | ||
# gitalk_cdn_prefix: https://cdnjs.cloudflare.com/ajax/libs/gitalk/1.4.0/ | ||
## CDN for MD5 | ||
md5_cdn: https://cdnjs.cloudflare.com/ajax/libs/blueimp-md5/2.10.0/js/md5.min.js | ||
# md5CDN: https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js | ||
|
||
# Baidu Share | ||
# Available value: | ||
|
@@ -1028,6 +1021,19 @@ vendors: | |
# Example: https://cdn.jsdelivr.net/npm/[email protected]/dist/Valine.min.js | ||
valine: | ||
|
||
# Internal version: | ||
# See: | ||
# Examples: | ||
# gitalk_js: https://cdn.bootcss.com/gitalk/1.4.0/gitalk.min.js | ||
# gitalk_css: https://cdn.bootcss.com/gitalk/1.4.0/gitalk.css | ||
gitalk_js: | ||
gitalk_css: | ||
|
||
# Internal version: 2.10.0 | ||
# See: https://github.com/blueimp/JavaScript-MD5 | ||
# Example: | ||
# md5: https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js | ||
md5: | ||
|
||
# Assets | ||
css: css | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,23 @@ | ||
{% if page.comments && theme.gitalk.enable %} | ||
<link rel="stylesheet" href=" {{ theme.gitalk.gitalk_cdn_prefix }}gitalk.css"> | ||
<script type="text/javascript" src="{{ theme.gitalk.gitalk_cdn_prefix }}gitalk.min.js"></script> | ||
<script type="text/javascript" src="{{ theme.gitalk.md5_cdn }}"></script> | ||
|
||
{% set gitalk_js_url = "//cdn.bootcss.com/gitalk/1.4.0/gitalk.min.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. According to #105, it will be better to use jsDelivr as default cdn. |
||
{% if theme.vendors.gitalk_js %} | ||
{% set gitalk_js_url = theme.vendors.gitalk_js %} | ||
{% endif %} | ||
<script type="text/javascript" src="{{ gitalk_js_url }}"></script> | ||
|
||
{% set gitalk_css_url = "//cdn.bootcss.com/gitalk/1.4.0/gitalk.css" %} | ||
{% if theme.vendors.gitalk_css %} | ||
{% set gitalk_css_url = theme.vendors.gitalk_css %} | ||
{% endif %} | ||
<link rel="stylesheet" href="{{ gitalk_css_url }}"> | ||
|
||
{% set md5_url = "//cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js" %} | ||
{% if theme.vendors.md5 %} | ||
{% set md5_url = theme.vendors.md5 %} | ||
{% endif %} | ||
<script type="text/javascript" src="{{ md5_url }}"></script> | ||
|
||
<script type="text/javascript"> | ||
var gitalk = new Gitalk({ | ||
clientID: '{{ theme.gitalk.client_id }}', | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is there any reason not to include a internal version of gitalk?
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.
Yes, i think need to include internal version.
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.
Fixed, both
gitalk
andmd5
cdn source from jsDelivr now.