Skip to content

Commit 31de468

Browse files
huanmmistakes
authored andcommittedJan 8, 2019
Add support to customize issue-term (mmistakes#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`.
1 parent ad0edfd commit 31de468

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎_includes/comments-providers/utterances.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
var script = document.createElement('script');
1212
script.setAttribute('src', 'https://utteranc.es/client.js');
1313
script.setAttribute('repo', '{{ site.repository }}');
14-
script.setAttribute('issue-term', 'pathname');
14+
script.setAttribute('issue-term', '{{ site.comments.utterances.issue_term | default: "pathname" }}');
1515
script.setAttribute('theme', '{{ site.comments.utterances.theme | default: "github-light" }}');
1616
script.setAttribute('crossorigin', 'anonymous');
1717

1818
commentContainer.appendChild(script);
1919
})();
20-
</script>
20+
</script>

0 commit comments

Comments
 (0)
Please sign in to comment.