1
0
Fork 0

update GraphComment

This commit is contained in:
nanxiaobei 2023-01-09 01:49:43 +08:00
parent c4a53de0b4
commit 7893d76190
2 changed files with 18 additions and 16 deletions

View file

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

View file

@ -67,30 +67,34 @@
</script>
{{ end }}
<!-- GraphComments -->
{{ if and site.Params.graphcommentId (not (eq .Params.comments false)) }}
<!-- GraphComment -->
{{ 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 }}",
graphcommentId: '{{ site.Params.graphCommentId }}',
behaviour: {
// uid: "...",
},
// configure your variables here
}
};
function __semio__onload() {
__semio__gc_graphlogin(__semio__params)
__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);
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 }}