themefisher / airspace-hugo

Airspace Hugo theme for multipurpose use, like Portfolio, Blog, Business.
https://gethugothemes.com/products/airspace/?utm_source=airspace_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
354 stars 509 forks source link

import to forestry not working for instant previews #155

Closed vce-open closed 3 years ago

vce-open commented 3 years ago

with the hugo version mentioned in examplesite/.forestry settings file we get


panic: interface conversion: interface {} is string, not map[string]interface {}

goroutine 1 [running]:
github.com/nicksnyder/go-i18n/i18n/bundle.parseTranslations(0xc0000376ca, 0x7, 0xc000104d80, 0x436, 0x436, 0xc4bf91, 0xc000696030, 0xc000679000, 0x436, 0xc000104d80)
    /go/pkg/mod/github.com/nicksnyder/go-i18n@v1.10.0/i18n/bundle/bundle.go:100 +0x761
github.com/nicksnyder/go-i18n/i18n/bundle.(*Bundle).ParseTranslationFileBytes(0xc00051fe00, 0xc0000376ca, 0x7, 0xc000104d80, 0x436, 0x436, 0xc00003768a, 0xc0003fc270)
    /go/pkg/mod/github.com/nicksnyder/go-i18n@v1.10.0/i18n/bundle/bundle.go:75 +0xdb
github.com/gohugoio/hugo/langs/i18n.addTranslationFile(0xc00051fe00, 0x1bca2e0, 0xc0001e0000, 0x4, 0x0)
    /root/project/hugo/langs/i18n/translationProvider.go:98 +0x13f
github.com/gohugoio/hugo/langs/i18n.(*TranslationProvider).Update(0xc0003dcdc0, 0xc000676f00, 0x0, 0x0)
    /root/project/hugo/langs/i18n/translationProvider.go:79 +0x2d3
github.com/gohugoio/hugo/deps.(*Deps).LoadResources(0xc000676f00, 0x0, 0x0)
    /root/project/hugo/deps/deps.go:161 +0x43
github.com/gohugoio/hugo/hugolib.applyDeps(0xc0003dc6a0, 0xc000335300, 0xc0005daee0, 0x0, 0x0, 0x1bc3e80, 0xc000676b00, 0xc0003c1500, 0x11, 0x11, ...)
    /root/project/hugo/hugolib/hugo_sites.go:403 +0x3bb
github.com/gohugoio/hugo/hugolib.newHugoSites(0xc0003dc6a0, 0xc000335300, 0x0, 0x0, 0x0, 0x1bc3e80, 0xc000676b00, 0x0, 0x0, 0x0, ...)
    /root/project/hugo/hugolib/hugo_sites.go:311 +0x4f7
github.com/gohugoio/hugo/hugolib.NewHugoSites(0xc0003dc6a0, 0xc000335300, 0x0, 0x0, 0x0, 0x1bc3e80, 0xc000676b00, 0x0, 0x0, 0x0, ...)
    /root/project/hugo/hugolib/hugo_sites.go:426 +0x12f
github.com/gohugoio/hugo/commands.(*commandeer).loadConfig.func3()
    /root/project/hugo/commands/commandeer.go:394 +0x281
sync.(*Once).doSlow(0xc000523c60, 0xc000671950)
    /usr/local/go/src/sync/once.go:66 +0xe3
sync.(*Once).Do(...)
    /usr/local/go/src/sync/once.go:57
github.com/gohugoio/hugo/commands.(*commandeer).loadConfig(0xc0006728f0, 0xc000670101, 0x1b8aee0, 0xc0000ba008)
    /root/project/hugo/commands/commandeer.go:353 +0x851
github.com/gohugoio/hugo/commands.newCommandeer(0x101, 0xc00052aa90, 0x1b89800, 0xc0000f1f00, 0xc0004a79c0, 0x0, 0x0, 0x0, 0x1737160, 0xc000676900, ...)
    /root/project/hugo/commands/commandeer.go:178 +0x20f
github.com/gohugoio/hugo/commands.initializeConfig(0x101, 0xc00052aa90, 0x1b89800, 0xc0000f1f00, 0xc0004a79c0, 0x0, 0x0, 0xc0000c55a8)
    /root/project/hugo/commands/hugo.go:123 +0x76
github.com/gohugoio/hugo/commands.(*serverCmd).server(0xc0000f1f00, 0xc00042b680, 0xc0005f0500, 0x0, 0xa, 0x0, 0x0)
    /root/project/hugo/commands/server.go:238 +0x1c5
github.com/spf13/cobra.(*Command).execute(0xc00042b680, 0xc0005f03c0, 0xa, 0xa, 0xc00042b680, 0xc0005f03c0)
    /go/pkg/mod/github.com/spf13/cobra@v0.0.4-0.20190321000552-67fc4837d267/command.go:762 +0x460
github.com/spf13/cobra.(*Command).ExecuteC(0xc0005e9180, 0xc000564680, 0xc000671ec0, 0x1382652)
    /go/pkg/mod/github.com/spf13/cobra@v0.0.4-0.20190321000552-67fc4837d267/command.go:850 +0x2fb
github.com/gohugoio/hugo/commands.Execute(0xc0000be010, 0xb, 0xb, 0x4b4f0f, 0xc0000a2058, 0x0, 0x0)
    /root/project/hugo/commands/hugo.go:89 +0xb9
main.main()
    /root/project/hugo/main.go:23 +0x6c```

Cannot even change version it gives other errors of not finding config file when trying to do instant previews in forestry
salim-b commented 3 years ago

Yeah, sorry, the Hugo version configured for Netlify has to be increased to 0.83.1. See https://github.com/themefisher/airspace-hugo/issues/154#issuecomment-832510575. Or you can wait for #156 to be merged.

vce-open commented 3 years ago

thanks but i guess you should also change .forestry folder too

salim-b commented 3 years ago

thanks but i guess you should also change .forestry folder too

Ok, see https://github.com/themefisher/airspace-hugo/pull/158