Skip to content

Commit

Permalink
ERROR deprecated: .Site.DisqusShortname was deprecated in Hugo v0.120…
Browse files Browse the repository at this point in the history
….0 and will be removed in Hugo 0.134.0. Use .Site.Config.Services.Disqus.Shortname instead.
  • Loading branch information
yaheya committed Aug 28, 2024
1 parent ea73e74 commit 8019650
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions layouts/_internal/disqus.html
Original file line number Diff line number Diff line change
@@ -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}}
Expand All @@ -13,7 +13,7 @@
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);
})();
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/disqus.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
return;

var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
var disqus_shortname = '{{ .Site.DisqusShortname }}';
var disqus_shortname = '{{ .Site.Config.Services.Disqus.Shortname }}';
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
Expand Down
4 changes: 2 additions & 2 deletions themes/gruvhugo/layouts/_internal/disqus.html
Original file line number Diff line number Diff line change
@@ -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}}
Expand All @@ -13,7 +13,7 @@
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);
})();
Expand Down
2 changes: 1 addition & 1 deletion themes/gruvhugo/layouts/partials/disqus.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
return;

var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
var disqus_shortname = '{{ .Site.DisqusShortname }}';
var disqus_shortname = '{{ .Site.Config.Services.Disqus.Shortname }}';
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
Expand Down

0 comments on commit 8019650

Please sign in to comment.