gethugothemes/dot-hugo

this template does not seem to be compatible with the latest version of hugo (0.120.4)

WilliamBonvini opened this issue · 2 comments

I can't start a local server with the latest version of hugo (0.120.4). There seems to be a problem associated with the partials.

I've also tested this behaviour in a computer with Windows 10: same problem.

current configuration

  • Operating system: MacOs
  • Architecture: M1

reproducible example

>> hugo version
hugo v0.120.4-f11bca5fec2ebb3a02727fb2a5cfb08da96fd9df+extended darwin/arm64 BuildDate=2023-11-08T11:18:07Z VendorInfo=brew
>> hugo serve 
ERROR render of "section" failed: "/Users/chattershuts/Desktop/BitBucket/dot-hugo/themes/dot-hugo/layouts/_default/list.html:3:3": execute of template failed: template: _default/list.html:3:3: executing "main" at <partial "default.html" .>: error calling partial: "/Users/chattershuts/Desktop/BitBucket/dot-hugo/themes/dot-hugo/layouts/partials/default.html:1:3": execute of template failed: template: partials/default.html:1:3: executing "partials/default.html" at <partial "components/search-modal" .>: error calling partial: execute of template failed: html/template:partials/components/search-modal.html: ends in a non-text context: {stateJSBqStr delimNone urlPartNone jsCtxRegexp attrNone elementScript <nil>}
Built in 231 ms
Error: error building site: render: failed to render pages: render of "section" failed: "/Users/chattershuts/Desktop/BitBucket/mlr-portal/themes/dot-hugo/layouts/_default/list.html:3:3": execute of template failed: template: _default/list.html:3:3: executing "main" at <partial "default.html" .>: error calling partial: "/Users/chattershuts/Desktop/BitBucket/dot-hugo/themes/dot-hugo/layouts/partials/default.html:1:3": execute of template failed: template: partials/default.html:1:3: executing "partials/default.html" at <partial "components/search-modal" .>: error calling partial: execute of template failed: html/template:partials/components/search-modal.html: ends in a non-text context: {stateJSBqStr delimNone urlPartNone jsCtxRegexp attrNone elementScript <nil>}

Hey @WilliamBonvini,

We found the bug you had with search in version 0.120.4. The newest version of Hugo fixed it, so updating Hugo is a good idea.

Even though you're using dot-hugo, the super-fast search we added in version 3.0.0 also fixes this problem. Upgrading to dot-hugo 3.0.0 will make sure you don't see this issue again.

Let us know if you have any questions!

Thank you very much @tfsumon :) In the meanwhile I proceeded to write a custom search functionality, but I'll surely look into your implementation in case of necessity.