Merge da1873ae38
into 01f9e43e59
This commit is contained in:
commit
8ac20ac3f2
|
@ -127,6 +127,7 @@ commento = false
|
|||
[utterances] # https://utteranc.es/
|
||||
owner = "" # Your GitHub ID
|
||||
repo = "" # The repo to store comments
|
||||
issueTerm = "" # Choose the mapping between blog posts and GitHub issues. pathname (default), title, url, og:title...
|
||||
|
||||
[gitalk] # Gitalk is a comment system based on GitHub issues. see https://github.com/gitalk/gitalk
|
||||
owner = "" # Your GitHub ID
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
var owner = JSON.parse({{ $owner | jsonify }});
|
||||
{{ $repo:= .Site.Params.utterances.repo }}
|
||||
var repo = JSON.parse({{ $repo | jsonify }});
|
||||
{{ $issueTerm:= .Site.Params.utterances.issueTerm | default "pathname" }}
|
||||
var issueTerm = JSON.parse({{ $issueTerm | jsonify }});
|
||||
{{ $baseTheme:= index .Site.Params.themeOptions 0 }}
|
||||
var baseTheme = JSON.parse({{ $baseTheme | jsonify }});
|
||||
var localTheme = localStorage.getItem('theme');
|
||||
|
@ -28,7 +30,7 @@
|
|||
var myScript = document.createElement('script');
|
||||
myScript.setAttribute('src', 'https://utteranc.es/client.js');
|
||||
myScript.setAttribute('repo', `${owner}/${repo}`);
|
||||
myScript.setAttribute('issue-term', 'pathname');
|
||||
myScript.setAttribute('issue-term', issueTerm);
|
||||
myScript.setAttribute('theme', utterTheme);
|
||||
myScript.setAttribute('crossorigin', 'anonymous');
|
||||
myScript.setAttribute('async', '');
|
||||
|
|
Loading…
Reference in New Issue