Error: pagination not supported for this page: kind: "page"

Using hugo v0.145.0+extended+withdeploy darwin/arm64 BuildDate=2025-02-26T15:41:25Z VendorInfo=brew. I have the following default.md archetype:

---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: false
# Stars cheat <span class="stars">&#x2605;&#189;</span> (star, and fraction)
# Use <!-- more --> to split a long post.
# Available kinds:
# kind: "pinned, apple, movies, youtube, rant, lawn, image"
# If pinning, uncoment this:
# weight: 10
---

Yet, running hugo new posts/test.md renders:

---
title: "Content Placeholder"
_build:
  render: never
  list: never
  publishResources: false
---

What am I doing wrong?

Have a look at Archetypes - Lookup order

Supposedly there’s one defined for the posts section somewhere maybe in your theme.

I did. There was only default.md under “archetypes. Just in case, I copied it to all possible locations (I do not have a posts.md), and the result is still the same.

I am truly stumped. It works fine on Linux, same exact repository. It doesn’t work as it should under macOS.

no Mac here…but I suppose without a reproducible repo also the Mac ones stumble.

maybe corrupted caches, different module versions…

Anyone else has any ideas? To simplify things I made sure there are no archetypes on themes/themename/archetypes (it’s empty). Only archetype present is at root (where config.toml resides), which is default.md, with the contents above (repeating it again for clarity):

---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: false
# Stars cheat <span class="stars">&#x2605;&#189;</span> (star, and fraction)
# Use <!-- more --> to split a long post.
# Available kinds:
# kind: "pinned, apple, movies, youtube, rant, lawn, image"
# If pinning, uncoment this:
# weight: 10
—

Still, an hugo new posts/something.md creates:

---
title: "Content Placeholder"
_build:
  render: never
  list: never
  publishResources: false
—

Well, had to downgrade to 0.119 and everything works as it used to. While I understand progress can’t be stopped, having Hugo breaking/changing things [that worked fine] on new versions can wear one down.

If this were an endemic problem there would have been other reports long before now.

This is something unique to your environment, or perhaps to your configuration to which we do not have access.

I thought the same. I have not made any changes to my configuration (see below). With that configuration, things work fine with 0.119. With 0.145 it complains about paginatePath, and paginate. After changing the settings as the error recommends, it refuses to build, or simply run hugo server, throwing “Paginator” errors on layouts. It also behaves as explained on my original post, on new post creation.

I could “freeze” things on 0.119 (hey, it works!), but I am willing to troubleshoot. What would you need?

baseURL = 'https://netbros.com/'
title = 'Notes'
description = 'There is no such thing as an uninteresting subject...'
theme = 'mine'
disableKinds = ["section", "taxonomy", "term", "sitemap"]
paginatePath = 'n'
paginate = '80'
enableEmoji = true
summaryLength = '400'
disableAliases = true

[params]
  description = 'expecting no expectators, these are my short thoughts.'
  blurb = 'Notes is a microblog for frequent, shorter, thoughts, rants, links, and other miscellaneous things that interest me.'
  footer = '<a href="mailto:&#100;&#97;&#118;&#105;&#100;&#64;&#99;&#111;&#108;&#108;&#97;&#110;&#116;&#101;&#115;&#46;&#117;&#115;">Contact</a> me. My <a href="/uses/">/uses</a> and <a href="/now/">/now</a> pages. See the <a href="https://thoughts.page/webring">thoughts webring</a>.'
  images = ['https://netbros.com/card/notes_card.png']
  title = 'Notes'

params.social.twitter = 'do-not-have-a-twitter-nor-x-account'

[permalinks]
posts = '/:title'

[markup.goldmark.parser.attribute]
title = true # default is true; applies to h1-h6 elements
block = true # default is false; applies to other block-level elements 

[markup.goldmark.parser]
wrapStandAloneImageWithinParagraph = false # default is true

[markup.goldmark.renderer]
unsafe = true

OK, so with 0.145.0 you have TWO problems. Is that correct?

  1. The site won’t build (it throws an error)
  2. When you create new content you get “content placeholder” front matter.

Please confirm.

Confirmed.

If we solve #1 then #2 goes away. Change your site config to this:

baseURL = 'https://netbros.com/'
title = 'Notes'
description = 'There is no such thing as an uninteresting subject...'
theme = 'mine'
disableKinds = ["section", "taxonomy", "term", "sitemap"]
enableEmoji = true
summaryLength = 400
disableAliases = true

[pagination]
pagerSize = 80
path = 'n'

[params]
  description = 'expecting no expectators, these are my short thoughts.'
  blurb = 'Notes is a microblog for frequent, shorter, thoughts, rants, links, and other miscellaneous things that interest me.'
  footer = '<a href="mailto:&#100;&#97;&#118;&#105;&#100;&#64;&#99;&#111;&#108;&#108;&#97;&#110;&#116;&#101;&#115;&#46;&#117;&#115;">Contact</a> me. My <a href="/uses/">/uses</a> and <a href="/now/">/now</a> pages. See the <a href="https://thoughts.page/webring">thoughts webring</a>.'
  images = ['https://netbros.com/card/notes_card.png']
  title = 'Notes'

params.social.twitter = 'do-not-have-a-twitter-nor-x-account'

[permalinks]
posts = '/:title'

[markup.goldmark.parser.attribute]
title = true # default is true; applies to h1-h6 elements
block = true # default is false; applies to other block-level elements

Then build you site with v0.145.0 and share the error message.


Also, in your config, don’t quote numbers. We’re somewhat forgiving in your site config, but not elsewhere.

I get:

ERROR deprecated: .Page.PrevPage was deprecated in Hugo v0.123.0 and subsequently removed. Use .Page.Prev instead.
ERROR deprecated: .Page.NextPage was deprecated in Hugo v0.123.0 and subsequently removed. Use .Page.Next instead.
WARN  Raw HTML omitted while rendering "/Users/david/Gits/test/content/posts/1682783956.md"; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe
You can suppress this warning by adding the following to your site configuration:
ignoreLogs = ['warning-goldmark-raw-html’]

The WARN I get as many as posts I have. Then I get:

ERROR render of "/" failed: "/Users/david/Gits/test/themes/mine/layouts/index.html:3:17": execute of template failed: template: index.html:3:17: executing "index.html" at <.Paginate>: error calling Paginate: pagination not supported for this page: kind: "page", path: "/posts/1714735863", file: "/Users/david/Gits/test/content/posts/1714735863.md"
Built in 116 ms
Error: error building site: render: failed to render pages: render of "/" failed: "/Users/david/Gits/test/themes/mine/layouts/index.html:3:17": execute of template failed: template: index.html:3:17: executing "index.html" at <.Paginate>: error calling Paginate: pagination not supported for this page: kind: "page", path: "/posts/1741792596", file: "/Users/david/Gits/test/content/posts/1741792596.md”

This is what the index.html layout has:

{{ partial "header.html" . }}
{{ range .Paginator.Pages }}
{{ $paginator := .Paginate (where .Pages "Type" "posts") }}
<article>
<section class="note" id="{{ .Title }}">
<div class="note-date">
<span class="indexperm">â–‘ </span><a href="{{ .Permalink }}" title="Permalink">{{ .Date.Format "02 Jan 2006 / 15:04:05" }}</a> <button class="tinylytics_kudos" data-path="{{ .Permalink }}" ></button>
</div>
<div class="note-body">
{{ $parts := split .Content "<!-- more -->" }}
{{ $summary := index $parts 0 }}
{{ $summaryHTML := safeHTML $summary }}
{{ if eq $summaryHTML .Content }}
{{ .Content }}
{{ else }}
{{ $summaryHTML }}
<i class="ph ph-arrow-right"></i> <a class="readmore" href="{{ .Permalink }}" title="Read more..." alt="Read more...">Read more...</a>
{{ end }}
</div>
</section>
</article>
{{ end }}
<span class="paginator">
{{ partial "paginator.html" . }}
</span>
{{ partial "footer.html" . }}

And this is what paginator.html has:

{{ if .Paginator.HasPrev }}<a href="{{ .Paginator.Prev.URL }}" title="Newer" class="back">
<i class="ph ph-arrow-left"></i>
</a>{{ end }}
{{ if .Paginator.HasNext }}<a href="{{ .Paginator.Next.URL }}" title="Older" class="back">
<i class="ph ph-arrow-right"></i>
</a>{{ end }}

You are trying to paginate on a regular page, which is nonsensical because it doesn’t have a page collection… it isn’t a list page.

There was a bug prior to v0.123.0 where we didn’t throw an error in this situation.

What would the workaround (or right thing to do) be in this case?

Without access to your theme and site, I have no idea.

I have made it available on a git repository: GitHub - Fastidious/netbros.com: Notes. It is missing images, icons, and the like (I tried to reduce size), but everything else important is there. Appreciate your help.

Delete this line:
https://github.com/Fastidious/netbros.com/blob/main/themes/mine/layouts/index.html#L3

You’ve got empty template, unused templates, etc. You might want to spend some time cleaning all of this up.

Thank for the help, I am cleaning up right now. I noticed that before I could do:

This is a test image.

![Test](/path/image.jpg)
{.w100}

And that would apply class=w100 to the image, rendering like so:

<p>This is a test image.</p>
<img class=“w100” ….

Now the same above renders:

<This is a test image.</p>
<p class=“w100”>
<img ….>
</p>

It is encapsulating img on p and applying the class to the p instead of the image. Is there a way to revert to how it behaved before?

I can get around it by changing the CSS to be:

p.w100 img { … }

But I am curious if I am missing a configuration on the parser that allows the old behaviour.

https://gohugo.io/configuration/markup/#parserwrapstandaloneimagewithinparagraph

[markup.goldmark.parser]
wrapStandAloneImageWithinParagraph = false
1 Like