hacks-guide-minimal-mistake.../_includes/comments-providers/utterances.html
Huan LI (李卓桓) cac73fb87d Add support to customize issue-term (#2022)
Current we hardcoded the `pathname` for `issue-term` when we are using utterances comment provider.

It would be better for let users customize it by setting a `site.comments.utterances.issue_term` in their `_config.yml`.
2019-01-08 08:42:19 -05:00

21 lines
662 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" }}');
script.setAttribute('theme', '{{ site.comments.utterances.theme | default: "github-light" }}');
script.setAttribute('crossorigin', 'anonymous');
commentContainer.appendChild(script);
})();
</script>