HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.36k stars 2.9k forks source link

GoogleAnalytics build error in Hugo v0.133+ #3143

Closed Li-Jinjie closed 3 weeks ago

Li-Jinjie commented 1 month ago

Preliminary Checks

Description

When build the "theme-research-group" generated from the template, I encounter the problem ERROR deprecated: .Site.GoogleAnalytics was deprecated.

My hugo version is hugo v0.134.3.

I have noticed that this PR tries to solve this problem, but I don't know why this problem still exists in the "theme-research-group" template. Could you please check it?

Reproduction Link

https://github.com/Li-Jinjie/tmp-research-group

Steps to Reproduce

  1. update the hugo version to v0.133+
  2. clone the repository from https://github.com/HugoBlox/theme-research-group
  3. cd to the path
  4. execute hugo server

Expected Result

The site should be built successfully.

Actual Result

ERROR deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.135.0. Use .Site.Config.Services.GoogleAnalytics.ID instead. Built in 5366 ms Error: error building site: logged 1 error(s)

What Hugo Module versions does your site use?

module github.com/wowchemy/starter-hugo-research-group

go 1.15

require ( github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.8-0.20240513193311-41bd113535e8 github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-decap-cms v0.1.2-0.20231108143325-448ed0e3bd2b github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20240509231741-c3d23d929bc6 )

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

Firefox

Which Hugo Blox template are you using?

theme-research-group

What version of Hugo are you using?

hugo v0.134.3-5fb333b9f5ff4ec018f9d78910177d0bec1befb0+extended linux/amd64 BuildDate=2024-09-19T14:28:20Z VendorInfo=snap:0.134.3

c4yg70 commented 1 month ago

Same Problem now

c4yg70 commented 1 month ago

I find it is because the version of blox in the theme is not updated simultaneously. So please let the developer also update the theme version of blox.

Li-Jinjie commented 1 month ago

@gcushen Hi, could you please try to update the version for theme-research-group? Or could you please tell me what to do? I am willing to help.

derlade commented 1 month ago

Fix your Hugo versions to v0.125.7. Hugo devs keep implementing breaking changes in minor version numbers, so even if this is fixed, site building will likely still break in the future.