Hugo Deploy Error because of some configs depressiation
published: August 16, 2024, updated: August 17, 2024; 15:35
While deploying blog post with Hugo engine to Github, the following error received:
|
|
The grep -Rnie "site.disqus" .
returns two files where this config is used:
./layouts/_default/single.html:68: {{- if .Site.DisqusShortname -}}
./layouts/partials/disqus.html:10: var disqus_shortname = '{{ .Site.DisqusShortname }}';
Then change it from .Site.DisqusShortname to .Site.Config.Services.Disqus.Shortname. And now it deploys.
Update your theme either through git pull
request or hugo mod get -u
if a theme is used and added as module (very newest Hugo’s approach).
The search one more time for “.Site.DisqusShortname” and replace it with “.Site.Config.Services.Disqus.Shortname”.
Commit your changes and push to the repo.
Next time, we'll talk about "10 Reasons why gcc SHOULD be re-written in JavaScript - You won't believe #8!"