A Page variable is never going to be available from a partial unless you pass it along as context. Here you only pass the dot which is .Params.homepage at this point.
You will have to pass a dict as context to your partial containing both the page context and .Params.homepage
Building sites … ERROR 2018/08/25 15:32:13 Error while rendering “page” in “post\”: template: C:\src\proviamo\themes\hugo-lamp\layouts\post\single.html:12:35: executing “main” at <dict . .Site.BaseURL>: error calling dict: dictionary keys must be strings
Total in 381 ms
Error: Error building site: logged 1 error(s)
my original code was
{{ if isset .Params "images" }}
{{ partial "image-gallery.html" .}}
{{ end }}
with the same image-gallery.html but compiling i obtain
C:\src\proviamo>hugo server --disableFastRender
Building sites … ERROR 2018/08/25 15:35:57 Error while rendering “page” in “post\”: template: C:\src\proviamo\themes\hugo-lamp\layouts\post\single.html:12:5: executing “main” at <partial "image-galle…>: error calling partial: template: theme/partials/image-gallery.html:9:23: executing “theme/partials/image-gallery.html” at <.Site.BaseURL>: can’t evaluate field Site in type string
Total in 377 ms
Error: Error building site: logged 1 error(s)