hacks-guide-minimal-mistake.../_includes/comments-providers/utterances.html
John Scott 642ec7b20f
Added optional label attribute (#3128)
Added label attribute as per utterances optional label setting.
2021-10-19 11:18:00 -04:00

21 lines
786 B
HTML

<script>
'use strict';
(function() {
var commentContainer = document.querySelector('#utterances-comments');
if (!commentContainer) {
return;
}
var script = document.createElement('script');
script.setAttribute('src', 'https://utteranc.es/client.js');
script.setAttribute('repo', '{{ site.repository }}');
script.setAttribute('issue-term', '{{ site.comments.utterances.issue_term | default: "pathname" }}');
{% if site.comments.utterances.label %}script.setAttribute('label', '{{ site.comments.utterances.label }}');{% endif %}
script.setAttribute('theme', '{{ site.comments.utterances.theme | default: "github-light" }}');
script.setAttribute('crossorigin', 'anonymous');
commentContainer.appendChild(script);
})();
</script>