Error with transform.Unmarshal

Getting this error when building pages from a data source with current Hugo version 0.123.0

Error: error building site: render: failed to render pages: render of "home" failed: "C:\hugo-site\remote\data\layouts\index.html:3:25": execute of template failed: template: index.html:3:25: executing "index.html" at <transform.Unmarshal>: error calling Unmarshal: unknown format
{{- $URL := "<!-- remote JSON file -->" }}
{{ with resources.GetRemote $URL }}
{{ $data := . | transform.Unmarshal }}
{{ range $data.features }}
{{- with .properties }}
{{/* 1. */}} {{ $string := jsonify . }} 
{{/* 2. */}} {{ $filename := printf "data/%s.md" (urlize .Data_Name }} 
 {{/* 3. */}} {{ $resource := resources.FromString $filename $string}} 
{{/* 4. */}} {{ $file := $resource.RelPermalink }}
{{end}}
{{end}}
{{ end }}

Please provide the JSON URL, via DM if necessary.

Done!

Thanks. Looking into it…

So, it builds now. It seems the issue was either a remote connection problem or my own (internet) connection.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.