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

WARN deprecated: .Site.DisqusShortname was deprecated in Hugo v0.120.0 #199

Open
yada opened this issue Jun 28, 2024 · 2 comments
Open

WARN deprecated: .Site.DisqusShortname was deprecated in Hugo v0.120.0 #199

yada opened this issue Jun 28, 2024 · 2 comments
Assignees
Labels
kind/enhancement New feature or request

Comments

@yada
Copy link
Member

yada commented Jun 28, 2024

Reason/Context

The latest Hugo version (well, since 1.120.0, which was released on Oct 30, 2023) reports this deprecated issue:

WARN deprecated: .Site.DisqusShortname was deprecated in Hugo v0.120.0 and will be removed in a future release. Use .Site.Config.Services.Disqus.Shortname instead.

Description

This is not a critical update, but it is good to manage it up front and not wait for it to be decommissioned, as we rely on Disqus for the website blog post comments.

Implementation ideas

Based on Hugo's documentation:
https://gohugo.io/methods/site/disqusshortname/
https://gohugo.io/methods/site/config/

I have tested this simple update locally:

% diff themes/microcks/layouts/_default/single.html themes/microcks/layouts/_default/single.html.PATCHED
34c34
<         {{ if site.DisqusShortname }}
---
>         {{ if .Site.Config.Services.Disqus.Shortname }}

And it should work. No more WARN was reported when using Hugo. But need to be tested on the deployed site as:
Capture d’écran 2024-06-28 à 17 35 07

@yada yada added the kind/enhancement New feature or request label Jun 28, 2024
@yada yada self-assigned this Jun 28, 2024
@yada
Copy link
Member Author

yada commented Jun 28, 2024

@lbroudoux for input before committing this update.

@yada yada changed the title FIX: WARN deprecated: .Site.DisqusShortname was deprecated in Hugo v0.120.0 WARN deprecated: .Site.DisqusShortname was deprecated in Hugo v0.120.0 Jun 28, 2024
@lbroudoux
Copy link
Member

LGTM. You can commit this and I'll deploy a new version of the website.

yada added a commit that referenced this issue Jul 1, 2024
Signed-off-by: Yacine Kheddache <yacine@microcks.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants