Added support for Utterances labeling.
All blog posts created by Utterances will be labeled with a custom pre-defined label. The label needs to be manually added to your Github repository Issues labels. See more details in Utterances documentation: https://utteranc.es/#heading-issue-label Signed-off-by: Neven Cvetkovic <ncvetkovic@vmware.com>
+6 −1 · 3 files changed
-
README.md+1 −0 -
exampleSite/config/_default/params.toml+2 −1 -
layouts/partials/utterances.html+3 −0
@@ -820,6 +820,7 @@ You can override these setting from each post individually. For example, you may * Comment out the line for `disqusShortname = ""` in the `/config/_default/config.toml` file. * Set `comments = true` in the `/config/_default/params.toml` file. * Configure the utterances parameters in the `/config/_default/params.toml` file. + * Optionally, you can choose a label that will be assigned to all issues created by Utterances. The label must exist in your Github repository, as Utterances cannot attach labels that do not exist. Configure `utterancesLabel` parameter in `/config/_default/params.toml` file, after you have added a label to your Github repository Issues labels. Labels are case sensitive and support Emoji in label names. ✨💬✨ Utterances is loaded in the `comments.html` partial by referring to the `utterances.html` partial. Since `single.html` layout loads comments if comments are enabled, you must ensure *both* the `comments` and `utterances` parameters are configured. @@ -103,8 +103,9 @@ languageMenuName = "🌐" # comments = false # Enable or disable Utterances (https://github.com/utterance/utterances) Github Issue-Based Commenting -# utterances = true #Run the utterances script in the single.html layout to load https://utteranc.es comments +# utterances = true # Run the utterances script in the single.html layout to load https://utteranc.es comments # utterancesRepo = "GHUsername/Repository.Name" # Utterances is enabled when this param is set +# utterancesLabel = "blog comments ✨💬✨" # The label needs to be manually added to your Github repository issues before configuring here # utterancesTheme = "github-light" # Default: github-dark # utterancesIssueTerm = "pathname" # Default: pathname @@ -3,6 +3,9 @@ repo="{{.Site.Params.utterancesRepo}}" issue-term="{{.Site.Params.utterancesIssueTerm | default "pathname"}}" theme="{{.Site.Params.utterancesTheme | default "github-dark"}}" + {{ if .Site.Params.utterancesLabel }} + label="{{.Site.Params.utterancesLabel | default "comments"}}" + {{ end }} crossorigin="anonymous" async> </script>