I’m trying to create a new page ‘Blog’ that lists all the posts, instead of the homepage. To do this, first I created a new blog.md
in content
with this frontmatter:
---
title: "Blog"
layout: blog
---
And then I created a new .HTML in layouts/_default
called blog.html
, where I’ve entered this:
{{ define "main" }}
{{ partial "articles/articles.html" . }}
{{ end }}
This is what was used on the homepage to display posts, so I figured it should work if I created a page for it on its own too.
But this gives me the following error:
Rebuild failed:
Failed to render pages: render of "page" failed: execute of template failed: template: _default/blog.html:3:3: executing "main" at <partial "articles/articles.html" .>:
error calling partial: execute of template failed: template: partials/articles/articles.html:3:5: executing "partials/articles/articles.html" at <partial "articles/list.html" .>:
error calling partial: "D:\Srishti\Year 2 Semester 1\Blogdown\Website\themes\hugo-theme-novela\layouts\partials\articles\list.html:7:47": execute of template failed: template: partials/articles/list.html:7:47: executing "partials/articles/list.html" at
<$paginator.Pages>: error calling Pages: runtime error: invalid memory address or nil pointer dereference
Hugo Static Site Generator v0.79.0/extended windows/amd64 BuildDate: unknown
How can I do this?