From aa38ba2005dc085485a2e52be6b0fd22f54bb5ee Mon Sep 17 00:00:00 2001 From: John Scott <68079471+JohnScottUK@users.noreply.github.com> Date: Tue, 19 Oct 2021 16:18:00 +0100 Subject: [PATCH] Added optional label attribute (#3128) Added label attribute as per utterances optional label setting. --- _includes/comments-providers/utterances.html | 1 + docs/_docs/05-configuration.md | 1 + 2 files changed, 2 insertions(+) diff --git a/_includes/comments-providers/utterances.html b/_includes/comments-providers/utterances.html index 129ab7791da9..5cf6c5ccbb88 100644 --- a/_includes/comments-providers/utterances.html +++ b/_includes/comments-providers/utterances.html @@ -12,6 +12,7 @@ script.setAttribute('src', 'https://utteranc.es/client.js'); script.setAttribute('repo', '{{ site.repository }}'); 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('crossorigin', 'anonymous'); diff --git a/docs/_docs/05-configuration.md b/docs/_docs/05-configuration.md index 6e04524d213d..fed18c0f5a40 100644 --- a/docs/_docs/05-configuration.md +++ b/docs/_docs/05-configuration.md @@ -423,6 +423,7 @@ comments: utterances: theme: "github-light" # "github-dark" issue_term: "pathname" + label: "comment" # Optional - must be existing label. ``` #### giscus comments