hugolib: Deprecate .Site.DisqusShortname

Use .Site.Config.Services.Disqus.Shortname instead.
This commit is contained in:
Joe Mooring
2023-10-16 10:56:37 -07:00
committed by Bjørn Erik Pedersen
parent 625162674d
commit 2eca1b3cc1
6 changed files with 19 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
{{- $pc := .Site.Config.Privacy.Disqus -}}
{{- if not $pc.Disable -}}
{{ if .Site.DisqusShortname }}<div id="disqus_thread"></div>
{{ if .Site.Config.Services.Disqus.Shortname }}<div id="disqus_thread"></div>
<script type="application/javascript">
window.disqus_config = function () {
{{with .Params.disqus_identifier }}this.page.identifier = '{{ . }}';{{end}}
@@ -13,11 +13,11 @@
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + {{ .Site.DisqusShortname }} + '.disqus.com/embed.js';
s.src = '//' + {{ .Site.Config.Services.Disqus.Shortname }} + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>{{end}}
{{- end -}}
{{- end -}}