- 
                Notifications
    
You must be signed in to change notification settings  - Fork 3
 
Open
Description
Description
Since Hugo v0.146, partial lookups no longer support the old “double lookup” behavior when you call {{ partial "partials/foo" . }}. The lazyimg module’s vendored partials (e.g. layouts/partials/lazyimg-setup-nojs.html) still use:
{{ partial "partials/lazyimg-setup" . }}
and so Hugo cannot find them, resulting in errors like:
error calling partial: partial "partials/lazyimg-setup" not found
Steps to Reproduce
- Start a Hugo site (with modules enabled) on Hugo v0.146 or later.
 - In your config.*, import the module:
 
[[module.imports]]
path = "github.com/hugo-mods/lazyimg"
hugo mod tidy && hugo mod vendor- In your theme’s baseof.html, include lazyimg:
 
    {{ partial "lazyimg-setup-nojs" . }}
- Run 
hugo serverand attempt to build any page that renders images. 
Actual Behavior
Hugo fails with:
ERROR render of “…/lazyimg-setup-nojs.html”: error calling partial: partial "partials/lazyimg-setup" not found
Expected Behavior
The module’s partials should work out of the box on Hugo v0.146+ without manual patching.
Environment
- Hugo version: 0.146 (and later)
 - Go Modules enabled (module.imports in config, go.mod present)
 - Lazyimg version: latest via hugo mod get github.com/hugo-mods/lazyimg
 - Theme scenario: vendored under themes/seb-doc/_vendor/...
 
Workaround
Remove the partials/ prefix in the vendored partial names, e.g. change in
_vendor/github.com/hugo-mods/lazyimg/layouts/partials/lazyimg-setup-nojs.html:
- {{ partial "partials/lazyimg-setup" . }}
+ {{ partial "lazyimg-setup" . }}
Metadata
Metadata
Assignees
Labels
No labels