Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(layouts/single) Site.DisqusShortname was deprecated in v0.120.0 #91

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

ehdwn1991
Copy link
Contributor

Update Disqus Shortname to Use New Config Structure

Summary

This pull request updates the Disqus shortname configuration in the single.html template to follow Hugo's new configuration structure. The previous Site.DisqusShortname has been deprecated and replaced by Site.Config.Services.Disqus.Shortname.

For more details, please refer to the Hugo_methods_ DisqusShortname integration.

Errors Details

Testing in Alpine based container.

hugo_builder  | ERROR deprecated: .Site.DisqusShortname was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.135.0. Use .Site.Config.Services.Disqus.Shortname instead.

This error occurred when attempting to render the single.html template for posts that include Disqus comments. By updating to the new configuration structure, the error is resolved, and future compatibility with Hugo is ensured.

Changes:

  • Updated the condition in single.html from Site.DisqusShortname to Site.Config.Services.Disqus.Shortname.
  • Adjusted the config.toml to reflect the new Disqus shortname structure:
    [services]
      [services.disqus]
        shortname = "your-disqus-shortname"
    
    

Thanks! Have a Good day!!😄

@bep bep merged commit ad521af into spf13:master Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants