From 96a7d0494d5e721c2ee3f7323b1076799c136912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Huan=20LI=20=28=E6=9D=8E=E5=8D=93=E6=A1=93=29?= Date: Tue, 8 Jan 2019 21:42:19 +0800 Subject: [PATCH] Add support to customize `issue-term` (#2022) Current we hardcoded the `pathname` for `issue-term` when we are using utterances comment provider. It would be better for let users customize it by setting a `site.comments.utterances.issue_term` in their `_config.yml`. --- _includes/comments-providers/utterances.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/comments-providers/utterances.html b/_includes/comments-providers/utterances.html index b1c08f3cd8eb..129ab7791da9 100644 --- a/_includes/comments-providers/utterances.html +++ b/_includes/comments-providers/utterances.html @@ -11,10 +11,10 @@ var script = document.createElement('script'); script.setAttribute('src', 'https://utteranc.es/client.js'); script.setAttribute('repo', '{{ site.repository }}'); - script.setAttribute('issue-term', 'pathname'); + script.setAttribute('issue-term', '{{ site.comments.utterances.issue_term | default: "pathname" }}'); script.setAttribute('theme', '{{ site.comments.utterances.theme | default: "github-light" }}'); script.setAttribute('crossorigin', 'anonymous'); commentContainer.appendChild(script); })(); - \ No newline at end of file +