-
Notifications
You must be signed in to change notification settings - Fork 3
/
giscus.njk
28 lines (26 loc) · 1.13 KB
/
giscus.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{{ next_data('giscus', config.giscus) }}
<script>
document.addEventListener('page:loaded', () => {
if (!CONFIG.page.comments) return;
NexT.utils.loadComments('.giscus-container')
.then(() => NexT.utils.getScript('https://giscus.app/client.js', {
attributes: {
async : true,
crossOrigin : 'anonymous',
'data-repo' : CONFIG.giscus.repo,
'data-repo-id' : CONFIG.giscus.repo_id,
'data-category' : CONFIG.giscus.category,
'data-category-id' : CONFIG.giscus.category_id,
'data-mapping' : CONFIG.giscus.mapping,
'data-strict' : CONFIG.giscus.strict,
'data-reactions-enabled': CONFIG.giscus.reactions_enabled,
'data-emit-metadata' : CONFIG.giscus.emit_metadata,
'data-theme' : CONFIG.giscus.theme,
'data-lang' : CONFIG.giscus.lang,
'data-input-position' : CONFIG.giscus.input_position,
'data-loading' : CONFIG.giscus.loading
},
parentNode: document.querySelector('.giscus-container')
}));
});
</script>