<!-- CSS -->
<link href="https://cdn.taurusxin.com/hugo/assets/artalk/2.9.1/Artalk.min.css" rel="stylesheet">

<!-- JS -->
<script src="https://cdn.taurusxin.com/hugo/assets/artalk/2.9.1/Artalk.min.js"></script>

<!-- Artalk -->
<div id="Comments"></div>

<script>
  const artalkInstance = Artalk.init({
    el:        '#Comments',
    pageKey:   '{{ .Page.RelPermalink }}',
    pageTitle: '{{ .Title }}',
    server:    '{{ $.Site.Params.comments.artalk.server }}',
    site:      '{{ $.Site.Params.comments.artalk.site }}',
    darkMode:  '{{ $.Site.Params.comments.artalk.darkMode }}'
  })

  window.addEventListener('onColorSchemeChange', (e) => {
    artalkInstance.setDarkMode(e.detail == 'dark')
  })
</script>
