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

[Bug] .Site.DisqusShortname deprecated as of Hugo v0.120.0 #471

Closed
4 tasks done
IntModifier opened this issue Jun 8, 2024 · 1 comment
Closed
4 tasks done

[Bug] .Site.DisqusShortname deprecated as of Hugo v0.120.0 #471

IntModifier opened this issue Jun 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@IntModifier
Copy link

I confirm:

Hugo version

hugo v0.127.0-74e0f3bd63c51f3c7a0f07a7c779eec9e922957e+extended windows/amd64 BuildDate=2024-06-05T10:27:59Z VendorInfo=gohugoio

Where is this bug showing up?

On the command line: Hugo won't build the site and shows warnings or errors.

Operating system

Windows 11

Browser (if applicable)

Firefox 126.0.1 (64-bit)

Current behavior

When running 'hugo' or 'hugo server' command, a warning is displayed: (the site still builds as expected after the warning is displayed)

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.

i looked through the file and found that .\layouts\partials\comments.html is the file referencing '.Site.DisqusShortname', on my local copy of the theme project I updated line 2 to be:
{{ if .Site.Config.Services.Disqus.Shortname }}
and tried building the site again and now received no Warning.

I am not nearly confident enough about the details on how a Hugo theme is built and works to submit a pull request but I wanted to share in case it is as simple as updating this one file.

Thanks for the great theme!

Expected behavior

Not receiving the depreciation warning when running 'hugo' or 'hugo server' commands

Steps to reproduce

build site using hugo-clarity theme with Hugo v0.120.0 or later

Relevant log output

Start building sites … 
hugo v0.127.0-74e0f3bd63c51f3c7a0f07a7c779eec9e922957e+extended windows/amd64 BuildDate=2024-06-05T10:27:59Z VendorInfo=gohugoio     

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.

                   | EN
-------------------+-----
  Pages            | 47
  Paginator pages  |  2
  Non-page files   | 16
  Static files     | 41
  Processed images |  0
  Aliases          | 33
  Cleaned          |  0

Total in 5584 ms

Related code

File: .\layouts\partials\comments.html
Line 2
current: {{ if .Site.DisqusShortname }}
new: {{ if .Site.Config.Services.Disqus.Shortname }}

Preferred solution

No response

Other information

No response

@IntModifier IntModifier added the bug Something isn't working label Jun 8, 2024
@onweru onweru self-assigned this Jun 10, 2024
@chipzoller
Copy link
Owner

This was fixed in #478 so closing. If that doesn't appear correct, someone re-comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants