<.URL>: can't evaluate field URL in type page.Page

It shows that

Error: Error building site: failed to render pages: render of “section” failed: “layouts/posts/list.html:5:35”: execute of template failed: template: posts/list.html:5:35: executing “posts/list.html” at <.URL>: can’t evaluate field URL in type page.Page

this is the layouts/posts/list.html

{{ partial "header.html" . }}
<div class="news-article box">
{{ with .Data.Pages }}
    {{ range .ByDate}}
        <li><a {{ printf "href=%q" .URL | safeHTMLAttr }}>{{ default .Title .Params.heading }}</a></li>
    {{ end }}
{{ end }}
</div>
{{ partial "footer.html" . }}

Try .Permalink or .RelPermalink instead.

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