microcks / microcks.io

Public website resources and templates
https://microcks-io.vercel.app
Apache License 2.0
6 stars 31 forks source link

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

Open yada opened 4 days ago

yada commented 4 days ago

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 commented 4 days ago

@lbroudoux for input before committing this update.

lbroudoux commented 2 days ago

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