victor-hugo icon indicating copy to clipboard operation
victor-hugo copied to clipboard

Can’t evaluate field Related in type hugolib.Pages

Open lgallen opened this issue 6 years ago • 3 comments

- Do you want to request a feature or report a bug? Bug report

- What is the current behavior? When .Related is called, as in .Site.RegularPages.Related, the message "Can’t evaluate field Related in type hugolib.Pages" The same site does not return an error when built with hugulp.

- If the current behavior is a bug, please provide the steps to reproduce.

- What is the expected behavior? Should see a list of related posts generated at the bottom of each blog post.

- Please mention your node.js, NPM, Hugo and operating system version.

  • Node v8.9.1
  • npm: '5.5.1'
  • Hugo Static Site Generator v0.31.1
  • Ubuntu 16.04.3 LTS

lgallen avatar Feb 27 '18 01:02 lgallen

I believe bep was right when you asked this on the Hugo forum - you're calling .Related on a list of pages rather than an individual Page.

erquhart avatar Oct 30 '18 15:10 erquhart

Ah, nope, you're right: https://gohugo.io/content-management/related/#list-related-content

erquhart avatar Oct 30 '18 15:10 erquhart

I have had no problems running the exact same code with base Hugo or with Hugulp. The problem has been unique to Victor Hugo.

lgallen avatar Oct 31 '18 01:10 lgallen