Hi, I am trying to build a blog with the Poison theme. I have some basic single About/Publication pages (as seen on the live version here) set up but am struggling to add blog posts under content/posts
. This is what the content folder looks like currently:
content
├── _index.md
├── about
│ └── _index.md
├── landing
│ └── _index.md
├── posts
│ ├── _index.md
│ └── pii-kaggle.md
└── publications
└── _index.md
pii-kaggle.md
is the post I am trying to write, the front-matter looks like the following:
+++
title = 'Classifying personally identifiable information (PII) in essays: a Kaggle debrief'
date = 2024-06-22T19:32:50-04:00
draft = false
+++
On building, this is the error I get:
Error: error building site: render: failed to render pages: render of "page" failed: "/Users/muhammadali/blog/hugo/layouts/_default/baseof.html:1:3": execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "head/head.html" .>: error calling partial: "/Users/muhammadali/blog/hugo/layouts/partials/head/head.html:16:7": execute of template failed: template: partials/head/head.html:16:7: executing "partials/head/head.html" at <partial "head/meta.html" .>: error calling partial: "/Users/muhammadali/blog/hugo/layouts/partials/head/meta.html:96:17": execute of template failed: template: partials/head/meta.html:96:17: executing "partials/head/meta.html" at <.Paginate>: error calling Paginate: pagination not supported for this page: kind: "page", path: "/posts/pii-kaggle", file: "/Users/muhammadali/blog/hugo/content/posts/pii-kaggle.md"
It seems to be an issue with pagination on kind: "page"
, I do not know where this kind is set for my markdown file and what needs to be fixed with my pagination configuration to make this work. To help debug, I am providing the directory structure of the layouts
directory and line 97 from partials/head/meta.html
below.
layouts
├── 404.html
├── _default
│ ├── _markup
│ │ └── render-link.html
│ ├── baseof.html
│ ├── list.html
│ └── single.html
├── about
│ └── about.html
├── index.html
├── partials
│ ├── head
│ │ ├── css.html
│ │ ├── favicon.html
│ │ ├── head.html
│ │ ├── meta.html
│ │ ├── scripts.html
│ │ └── stylesheets.html
│ ├── light_dark.html
│ ├── pagination.html
│ ├── post
│ │ ├── comments.html
│ │ ├── info.html
│ │ ├── listmonk_email_newsletters.html
│ │ └── navigation.html
│ ├── sidebar
│ │ ├── menu.html
│ │ ├── sidebar.html
│ │ ├── socials.html
│ │ └── title.html
│ └── table_of_contents.html
├── projects
│ └── projects.html
└── shortcodes
├── mermaid.html
├── plantuml.html
├── tab.html
└── tabs.html
--- inside partials/head/meta.html ---
{{ if eq .Section "posts" }}
<!-- Pagination meta tags for list pages only -->
{{ $paginator := .Paginate (where .Pages "Type" "posts") }}
{{ if $paginator }}
<link rel="first" href="{{ $paginator.First.URL }}" />
<link rel="last" href="{{ $paginator.Last.URL }}" />
{{ if $paginator.HasPrev }}
<link rel="prev" href="{{ $paginator.Prev.URL }}" />
{{end }}
{{ if $paginator.HasNext }}
<link rel="next" href="{{ $paginator.Next.URL }}" />
{{end }}
{{end }}
Happy to provide more code snippets if anything is unclear. Appreciate the help debugging this!