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' avatar = 'nanxiaobei@gmail.com'
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

@ -67,30 +67,34 @@
</script> </script>
{{ end }} {{ end }}
<!-- GraphComments --> <!-- GraphComment -->
{{ if and site.Params.graphcommentId (not (eq .Params.comments false)) }} {{ if and site.Params.graphCommentId (not (eq .Params.comments false)) }}
<div class="mt-24" id="graphcomment"></div> <div class="mt-24" id="graphcomment"></div>
<script type="text/javascript"> <script type="text/javascript">
var __semio__params = { var __semio__params = {
graphcommentId: "{{ .Site.Params.graphcommentId }}", graphcommentId: '{{ site.Params.graphCommentId }}',
behaviour: { behaviour: {
// uid: "...", // uid: "...",
}, },
// configure your variables here // configure your variables here
};
}
function __semio__onload() { function __semio__onload() {
__semio__gc_graphlogin(__semio__params) __semio__gc_graphlogin(__semio__params);
} }
(function () {
(function() { var gc = document.createElement('script');
var gc = document.createElement('script'); gc.type = 'text/javascript'; gc.async = true; gc.type = 'text/javascript';
gc.onload = __semio__onload; gc.defer = true; gc.src = 'https://integration.graphcomment.com/gc_graphlogin.js?' + Date.now(); gc.async = true;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc); 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> </script>
{{ end }} {{ end }}