hugo-toha / toha

A Hugo theme for personal portfolio
https://hugo-toha.github.io
MIT License
979 stars 567 forks source link

Errors after upgrade from V3 to V4 #945

Closed serverfriendsorg closed 3 weeks ago

serverfriendsorg commented 1 month ago

Expected Behavior

Website running correctly

Current Behavior

$ hugo server -w 
Watching for changes in /Users/serverfriendsorg/projects/gitlab.com/serverfriends_org/ws_serverfriendsorg/{assets,content,data,i18n,layouts,node_modules,package.hugo.json,package.json}
Watching for config changes in /Users/serverfriendsorg/projects/gitlab.com/serverfriends_org/ws_serverfriendsorg/hugo.yaml, /Users/serverfriendsorg/projects/gitlab.com/serverfriends_org/ws_serverfriendsorg/go.mod
Start building sites … 
hugo v0.126.1+extended darwin/arm64 BuildDate=2024-05-15T10:42:34Z VendorInfo=brew

Built in 958 ms
Error: error building site: render: failed to render pages: render of "home" failed: "/Users/serverfriendsorg/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.5.0/layouts/index.html:52:18": execute of template failed: template: index.html:52:18: executing "index.html" at <partial .section.template .>: error calling partial: "/Users/serverfriendsorg/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.5.0/layouts/partials/sections/experiences.html:21:12": execute of template failed: template: partials/sections/experiences.html:21:12: executing "partials/sections/experiences.html" at <partial "sections/experiences/positions.html" $experience>: error calling partial: "/Users/serverfriendsorg/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.5.0/layouts/partials/sections/experiences/positions.html:14:37": execute of template failed: template: partials/sections/experiences/positions.html:14:37: executing "partials/sections/

Possible Solution

Steps to Reproduce

1. 2. 3. 4.

Screenshots

Browsers Affected

Detailed Description

Thanks in advance for looking into this.

hossainemruz commented 1 month ago

There are some breaking changes between v3 and v4. Please, follow this migration guide. https://toha-guides.netlify.app/posts/update-v3-to-v4/

serverfriendsorg commented 3 weeks ago

Thanks @hossainemruz, that worked!

I had initialized the wrong project, so I ran instead of hugo mod init the theme path github.com/hugo-toha/toha/v4