Build Websites with Hugo: Using with recent Hugo versions

@bphogan

I was able to get to Chapter 4 - and got stuck on Pulling Data from Remote Sources where I see that getJason has been deprecated

I tried rewriting opens source.html as follows:

{{ define "main"}}
    <h2>{{ .Title }}</h2>

    {{ .Content }}
    {{ $repos := dict }}
    {{ $url := printf "%s/%s/repos" .Site.Params.gh_url .Site.Params.gh_user }}

{{ with resources.Get $url }} 
    {{ with . | transform.Unmarshal }}
        {{ $repos := . }}
    {{ end }}
    {{ else }}  
        
        <p>Error fetching data from GitHub API.</p>
    {{ end }}

    
    <section class="oss">
    {{ range $repos }} 
    <article>
        <h3><a href="{{ .html_url }}">{{.name }}</a></h3>
        <p>{{ .description }}</p>
    </article>
    {{ end }}
   </section> 
    
{{ end }}

Still cannot get the JSON from the remote source

Any suggestions?