2021-02-13 05:10:24 -05:00
|
|
|
{{- with .Site.Params.comments.remark42 -}}
|
|
|
|
<div id="remark42"></div>
|
|
|
|
<script>
|
|
|
|
var remark_config = {
|
2022-09-29 10:22:01 -04:00
|
|
|
host: '{{ .host }}',
|
2021-02-13 05:10:24 -05:00
|
|
|
site_id: '{{ .site }}',
|
|
|
|
components: ['embed'],
|
2022-09-29 10:22:01 -04:00
|
|
|
url: '{{ $.Permalink }}',
|
2021-02-13 05:10:24 -05:00
|
|
|
max_shown_comments: {{ default 15 .max_shown_comments }},
|
2021-06-20 09:49:35 -04:00
|
|
|
theme: document.documentElement.dataset.scheme,
|
2021-02-13 05:10:24 -05:00
|
|
|
page_title: '{{ $.Title }}',
|
|
|
|
locale: '{{ default "en" .locale }}',
|
|
|
|
show_email_subscription: {{ default true .show_email_subscription }}
|
|
|
|
};
|
|
|
|
|
2023-07-11 21:37:39 -04:00
|
|
|
!function(e, n) {
|
2022-09-29 10:22:01 -04:00
|
|
|
for (var o = 0; o < e.length; o++) {
|
|
|
|
var r = n.createElement('script'),
|
|
|
|
c = '.js',
|
|
|
|
d = n.head || n.body;
|
|
|
|
'noModule' in r ? (r.type = 'module', c = '.mjs') : r.async = !0, r.defer = !0, r.src = remark_config.host + '/web/' + e[o] + c, d.appendChild(r)
|
2021-02-13 05:10:24 -05:00
|
|
|
}
|
2022-09-29 10:22:01 -04:00
|
|
|
}(remark_config.components || ['embed'], document);
|
2021-02-13 05:10:24 -05:00
|
|
|
|
|
|
|
window.addEventListener('onColorSchemeChange', (e) => {
|
|
|
|
window.REMARK42.changeTheme(e.detail);
|
|
|
|
})
|
|
|
|
</script>
|
2021-06-20 09:49:35 -04:00
|
|
|
{{- end -}}
|