mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
hugolib: Deprecate .Site.DisqusShortname
Use .Site.Config.Services.Disqus.Shortname instead.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
625162674d
commit
2eca1b3cc1
@@ -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 -}}
|
||||
|
Reference in New Issue
Block a user