Change `disqus_config` to `window.disqus_config`
authorAkimo <qiuyuantahai5@gmail.com>
Wed, 23 Feb 2022 04:42:40 +0000 (13:42 +0900)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 23 Feb 2022 20:19:30 +0000 (21:19 +0100)
tpl/tplimpl/embedded/templates/disqus.html

index fed512ff0822901a87b78c2407db73a8f32e8a3f..ca5118608a38a2b6b08d621cc9a4a88e79ff67bf 100644 (file)
@@ -2,7 +2,7 @@
 {{- if not $pc.Disable -}}
 {{ if .Site.DisqusShortname }}<div id="disqus_thread"></div>
 <script type="application/javascript">
-    var disqus_config = function () {
+    window.disqus_config = function () {
     {{with .Params.disqus_identifier }}this.page.identifier = '{{ . }}';{{end}}
     {{with .Params.disqus_title }}this.page.title = '{{ . }}';{{end}}
     {{with .Params.disqus_url }}this.page.url = '{{ . | html  }}';{{end}}