🏗️ First time sync the css & js files from hexo theme NexT
This commit is contained in:
17
assets/js/third-party/comments/utterances.js
vendored
Normal file
17
assets/js/third-party/comments/utterances.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/* global NexT, CONFIG */
|
||||
|
||||
document.addEventListener('page:loaded', () => {
|
||||
if (!CONFIG.page.comments) return;
|
||||
|
||||
NexT.utils.loadComments('.utterances-container')
|
||||
.then(() => NexT.utils.getScript('https://utteranc.es/client.js', {
|
||||
attributes: {
|
||||
async : true,
|
||||
crossOrigin : 'anonymous',
|
||||
'repo' : CONFIG.utterances.repo,
|
||||
'issue-term': CONFIG.utterances.issue_term,
|
||||
'theme' : CONFIG.utterances.theme
|
||||
},
|
||||
parentNode: document.querySelector('.utterances-container')
|
||||
}));
|
||||
});
|
||||
Reference in New Issue
Block a user