I have a “Posts” content directory that holds a series of posts markdown files and a single.html template in my default layouts directory. In the footer of my single.html template, I want to display the the titles of the next and previous posts in this section using <h1>{{ .NextInSection.Title }}</h1>
. However, I keep getting the following error:
Error while rendering "page": template: /Users/jonathan/Desktop/portfolio-2018/layouts/_default/single.html:17:21: executing "main" at <.NextInSection.Title>: can't evaluate field Title in type *hugolib.Page
Not sure why I’m getting an error here. Thanks!