hugo-universal-theme icon indicating copy to clipboard operation
hugo-universal-theme copied to clipboard

Error while building website initially

Open nirzaf opened this issue 6 years ago • 8 comments

C:\Users\Nirzaf\source\repos\hugo-quad\quadrate-tech>hugo server Building sites … WARN 2019/10/25 14:23:25 Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function. Total in 387 ms Error: Error building site: failed to render pages: render of "home" failed: "C:\Users\Nirzaf\source\repos\hugo-quad\quadrate-tech\themes\hugo-universal-theme\layouts\index.html:3:10": execute of template failed: template: index.html:18:11: executing "index.html" at <partial "carousel.html" .>: error calling partial: "C:\Users\Nirzaf\source\repos\hugo-quad\quadrate-tech\themes\hugo-universal-theme\layouts\partials\carousel.html:3:10": execute of template failed: template: partials/carousel.html:3:10: executing "partials/carousel.html" at : wrong number of args for len: want 1 got 0

nirzaf avatar Oct 25 '19 08:10 nirzaf

Hello can you give to us more details? OS, Go version, Hugo version?

ryanfox1985 avatar Oct 25 '19 09:10 ryanfox1985

HI, I have the same error, on ubuntu 16.04 hugo version: v0.59.0-1DD0C69C linux/amd64 BuildDate: 2019-10-21T09:39:47Z, go version go1.6.2 linux/amd64. Thank you for help

skopz356 avatar Oct 27 '19 17:10 skopz356

I think this error becomes for this PR merged https://github.com/devcows/hugo-universal-theme/pull/212, and here is the hotfix: https://github.com/devcows/hugo-universal-theme/pull/237 @salim-b since you are the author from the merged PR can you take a look on my fix?

ryanfox1985 avatar Oct 27 '19 20:10 ryanfox1985

I think this error becomes for this PR merged #212

Well, #212 wasn't merged into master when this issue was opened (3 days ago)... :thinking:

Also the error occurs when processing partials/carousel.html which is unrelated to #212.

@salim-b since you are the author from the merged PR can you take a look on my fix?

I'll have a look.

salim-b avatar Oct 27 '19 20:10 salim-b

@nirzaf From the error message you posted I'd suspect that you (accidentally?) deleted or renamed the folder data/carousel...

salim-b avatar Oct 27 '19 20:10 salim-b

mmm, maybe is not related #212 xD I had an issue with an old site and I though it was the same error. Thanks and sorry @salim-b .

ryanfox1985 avatar Oct 27 '19 20:10 ryanfox1985

The bug I think comes from this line: https://github.com/devcows/hugo-universal-theme/blob/b724768834106a68906a50d27b98a7f51c6525db/layouts/partials/carousel.html#L3

mmm I think that you have an empty "data/carousel" folder, do you want to show a carousel? if you don't want there is an option:

[params.carousel]
    enable = false

ryanfox1985 avatar Oct 27 '19 21:10 ryanfox1985

Ran into the same issue and after reviewing the comment above, I had to disable a different option:

[params.carouselHomepage]
    enable = false

urosht avatar Apr 18 '22 13:04 urosht

Ran into the same issue and after reviewing the comment above, I had to disable a different option:

[params.carouselHomepage]
    enable = false

I do the same but same error. So I had to comment below [params.features] enable = false [params.testimonials] enable = false [params.clients] enable = false

panda2tv avatar Sep 30 '22 11:09 panda2tv