jhvanderschee / hugocodex

A website for front-end developers who want to learn Hugo.
http://hugocodex.org
23 stars 11 forks source link

share-buttons.html can't evaluate field URL in type page.Page #5

Closed vittorio88 closed 2 years ago

vittorio88 commented 2 years ago

I am no-longer able to use share-buttons.html on recent versions of Hugo.

I get the following build error: Error: Error building site: failed to render pages: render of "page" failed: "C:\Users\vitto\Desktop\lagobello-www-hugo-universal\layouts\page\single.html:33:29": execute of template failed: template: page/single.html:33:29: executing "page/single.html" at <partial "share-buttons.html" .>: error calling partial: "C:\Users\vitto\Desktop\lagobello-www-hugo-universal\layouts\partials\share-buttons.html:1:20": execute of template failed: template: partials/share-buttons.html:1:20: executing "partials/share-buttons.html" at <.Page.URL>: can't evaluate field URL in type page.Page

Seems the root-cause is: can't evaluate field URL in type page.Page

Environment: _hugo_0.101.0Windows-64bit.zip

jhvanderschee commented 2 years ago

.Page.URL is not a thing anymore, this is .Permalink. I will fix it.

jhvanderschee commented 2 years ago

We now have complete new code for this, thanks to Guus. I consider this fixed.