1
0
Fork 0

Add graph comment

This commit is contained in:
omid 2023-01-07 14:19:42 +03:30
parent 31d48aafa2
commit 976fff99cb
3 changed files with 31 additions and 0 deletions

View file

@ -64,6 +64,8 @@ disqusShortname = 'YOUR_DISQUS_SHORTNAME' # add disqus comments
name = 'YOUR_NAME' name = 'YOUR_NAME'
bio = 'YOUR_BIO' bio = 'YOUR_BIO'
graphcommentId = "graph id" # add graph comments id (disqus alternative)
# misc # misc
disableHLJS = true # disable requesting highlight.js disableHLJS = true # disable requesting highlight.js
monoDarkIcon = true # show monochrome dark mode icon monoDarkIcon = true # show monochrome dark mode icon

View file

@ -25,6 +25,7 @@ title = "Paper"
name = 'Lee' name = 'Lee'
bio = 'Discover fresh context' bio = 'Discover fresh context'
graphcommentId = "your graph id"
# ------------------------------ # ------------------------------
# needed to render raw HTML (e.g. <sub>, <sup>, <kbd>, <mark>) # needed to render raw HTML (e.g. <sub>, <sup>, <kbd>, <mark>)

View file

@ -66,6 +66,34 @@
document.head.appendChild(script); document.head.appendChild(script);
</script> </script>
{{ end }} {{ end }}
<!-- GraphComments -->
{{ if and site.Params.graphcommentId (not (eq .Params.comments false)) }}
<div class="mt-24" id="graphcomment"></div>
<script type="text/javascript">
var __semio__params = {
graphcommentId: "{{ .Site.Params.graphcommentId }}",
behaviour: {
// uid: "...",
},
// configure your variables here
}
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>
{{ end }}
</article> </article>
{{ end }} {{ end }}