Added optional label attribute (#3128)
Added label attribute as per utterances optional label setting.
This commit is contained in:
parent
000dc3b4a2
commit
642ec7b20f
2 changed files with 2 additions and 0 deletions
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue