Merge pull request #145 from syahravi/graphcomment
add partial "graphcomment"
This commit is contained in:
commit
0af5554f87
@ -21,6 +21,9 @@ readNextPosts = 2
|
||||
copyCodeButton = true
|
||||
rssAsSocialIcon = true
|
||||
|
||||
# Graphcomment support
|
||||
graphcommentId = ""
|
||||
|
||||
# utteranc.es support
|
||||
utterancesRepo = "" # mandatory
|
||||
utterancesTheme = "" # optional
|
||||
@ -60,4 +63,4 @@ category = "categories"
|
||||
tag = "tags"
|
||||
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
unsafe = true
|
||||
|
@ -22,6 +22,9 @@ readNextPosts = 2
|
||||
copyCodeButton = true
|
||||
rssAsSocialIcon = true
|
||||
|
||||
# Graphcomment support
|
||||
graphcommentId = ""
|
||||
|
||||
# utteranc.es support
|
||||
utterancesRepo = "" # mandatory
|
||||
utterancesTheme = "" # optional
|
||||
@ -83,4 +86,4 @@ category = "categories"
|
||||
tag = "tags"
|
||||
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
unsafe = true
|
||||
|
@ -49,4 +49,8 @@
|
||||
{{ partial "isso.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.graphcommentId }}
|
||||
{{ partial "graphcomment.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
32
layouts/partials/graphcomment.html
Normal file
32
layouts/partials/graphcomment.html
Normal file
@ -0,0 +1,32 @@
|
||||
<div id="graphcomment"></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
/* - - - CONFIGURATION VARIABLES - - - */
|
||||
|
||||
var __semio__params = {
|
||||
graphcommentId: "{{ .Site.Params.graphcommentId }}", // obviously you need to create your own ID on graphcomment.com
|
||||
|
||||
behaviour: {
|
||||
// HIGHLY RECOMMENDED
|
||||
// uid: "...", // uniq identifer for the comments thread on your page (ex: your page id)
|
||||
},
|
||||
|
||||
// configure your variables here
|
||||
|
||||
}
|
||||
|
||||
/* - - - DON'T EDIT BELOW THIS LINE - - - */
|
||||
|
||||
function __semio__onload() {
|
||||
__semio__gc_graphlogin(__semio__params)
|
||||
}
|
||||
|
||||
|
||||
(function() {
|
||||
var gc = document.createElement('script'); gc.type = 'text/javascript'; gc.async = true;
|
||||
gc.onload = __semio__onload; gc.defer = true; gc.src = 'https://integration.graphcomment.com/gc_graphlogin.js?' + Date.now();
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
|
||||
})();
|
||||
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user