Wowchemy-hugo-modules: Error when rendering publications

Created on 23 Oct 2018  Â·  2Comments  Â·  Source: wowchemy/wowchemy-hugo-modules

After a recent update hugo server throws the following error message, which I don't know how to decode:
Building sites … ERROR 2018/10/23 20:57:26 Error while rendering "page" in "publication/": template: publication/single.html:5:5: executing "publication/single.html" at <partial "page_header...>: error calling partial: template: partials/page_header.html:3:19: executing "partials/page_header.html" at <$page.Params.image.f...>: can't evaluate field focal_point in type interface {}

documentation

Most helpful comment

It's difficult to diagnose without seeing your repo.

Most likely you have the very old image = "" parameter in the front matter of some of your publications. This parameter was deprecated a while ago and should be removed.

In v3+ of Academic, there is a similarly named featured image option named [image] which can optionally be added to the front matter of pages:

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder. 
[image]
  # Caption (optional)
  caption = "Image credit: [**Unsplash**](https://unsplash.com/photos/pLCdAaMFLTE)"

  # Focal point (optional)
  # Options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
  focal_point = ""

All 2 comments

It's difficult to diagnose without seeing your repo.

Most likely you have the very old image = "" parameter in the front matter of some of your publications. This parameter was deprecated a while ago and should be removed.

In v3+ of Academic, there is a similarly named featured image option named [image] which can optionally be added to the front matter of pages:

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder. 
[image]
  # Caption (optional)
  caption = "Image credit: [**Unsplash**](https://unsplash.com/photos/pLCdAaMFLTE)"

  # Focal point (optional)
  # Options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
  focal_point = ""

@seichter thanks for reporting this, the breaking changes section of the v3 release notes has been updated to highlight this change.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CommonClimate picture CommonClimate  Â·  4Comments

somnathrakshit picture somnathrakshit  Â·  3Comments

halfrost picture halfrost  Â·  3Comments

brianguay picture brianguay  Â·  4Comments

melvidoni picture melvidoni  Â·  3Comments