Change disqus_config to window.disqus_config

This commit is contained in:
Akimo 2022-02-23 13:42:40 +09:00 committed by Bjørn Erik Pedersen
parent 96c0bdf3aa
commit 6ff39fd908

View file

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