diff options
-rw-r--r-- | config.yaml | 8 | ||||
-rw-r--r-- | layouts/partials/comments.html | 10 |
2 files changed, 6 insertions, 12 deletions
diff --git a/config.yaml b/config.yaml index 108f2d1..d561375 100644 --- a/config.yaml +++ b/config.yaml @@ -7,10 +7,10 @@ params: rss: To subscribe to this RSS feed, copy its address and paste it into your favorite feed reader. utterances: - repo: "" - issueTerm: "pathname" - theme: "github-light" - crossorigin: "anonymous" + enable: false + repo: + issueterm: pathname + theme: github-light menu: nav: diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index e196e45..ee5b23e 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,11 +1,5 @@ -{{if eq .Type "posts" }} {{ with .Site.Params.utterances }} -<script src="https://utteranc.es/client.js" - repo="{{ .repo }}" - issue-term="{{ .issueterm }}" - theme="{{ .theme }}" - crossorigin="{{ .crossorigin }}" - async> -</script> +{{ if in site.Params.mainSections $.Type | and .enable }} +<script src="https://utteranc.es/client.js" repo="{{ .repo }}" issue-term="{{ .issueterm }}" theme="{{ .theme }}" crossorigin="anonymous" async></script> {{end}} {{end}}
\ No newline at end of file |