Added optional label attribute (#3128)

Added label attribute as per utterances optional label setting.
This commit is contained in:
John Scott 2021-10-19 16:18:00 +01:00 committed by GitHub
parent 000dc3b4a2
commit 642ec7b20f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -12,6 +12,7 @@
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', '{{ site.comments.utterances.issue_term | default: "pathname" }}'); 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('theme', '{{ site.comments.utterances.theme | default: "github-light" }}');
script.setAttribute('crossorigin', 'anonymous'); script.setAttribute('crossorigin', 'anonymous');

View file

@ -423,6 +423,7 @@ comments:
utterances: utterances:
theme: "github-light" # "github-dark" theme: "github-light" # "github-dark"
issue_term: "pathname" issue_term: "pathname"
label: "comment" # Optional - must be existing label.
``` ```
#### giscus comments #### giscus comments