gethugothemes / liva-hugo

Liva is a personal blog template powered by Hugo.
https://gethugothemes.com/products/liva/?utm_source=liva_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
275 stars 237 forks source link

How to add related content? #29

Closed ashishmondal closed 4 years ago

ashishmondal commented 4 years ago

I am trying to add related content in single.html by following this: https://gohugo.io/content-management/related/.

I am getting the following error:

ERROR 2020/07/12 02:39:28 Failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:43:11: executing "main" at <partial "related">: error calling partial: "C:\Users\hb75729\src\the-blissful-aura\layouts\partials\related.html:3:50": execute of template failed: template: partials/related.html:3:50: executing "partials/related.html" at <first (.Site.Params.relatedPostsNumber | default 5)>: error calling first: both limit and seq must be provided

tfsomrat commented 4 years ago

Use a number after first, here first 3 (.Site.Params.relatedPostsNumber | default 5)

ashishmondal commented 4 years ago

My bad. I forgot to add a . while including the partial. It's working now. Thanks.