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`.
This commit is contained in:
parent
89c4169191
commit
cac73fb87d
1 changed files with 2 additions and 2 deletions
|
@ -11,10 +11,10 @@
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
script.setAttribute('src', 'https://utteranc.es/client.js');
|
script.setAttribute('src', 'https://utteranc.es/client.js');
|
||||||
script.setAttribute('repo', '{{ site.repository }}');
|
script.setAttribute('repo', '{{ site.repository }}');
|
||||||
script.setAttribute('issue-term', 'pathname');
|
script.setAttribute('issue-term', '{{ site.comments.utterances.issue_term | default: "pathname" }}');
|
||||||
script.setAttribute('theme', '{{ site.comments.utterances.theme | default: "github-light" }}');
|
script.setAttribute('theme', '{{ site.comments.utterances.theme | default: "github-light" }}');
|
||||||
script.setAttribute('crossorigin', 'anonymous');
|
script.setAttribute('crossorigin', 'anonymous');
|
||||||
|
|
||||||
commentContainer.appendChild(script);
|
commentContainer.appendChild(script);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue