Hugo v.140

I just wanted to start a thread for issues related to v.140.

I have my test blog at mandaris-test.micro.blog and using a custom theme.

I currently don’t have anything showing on the index.

This is what I’m using for pagination on the index page.

{{- range ( .Paginate (where .Site.RegularPages "Type" "post")).Pages }}
{{ partial "article.html" . }}   
{{- end }}

I tried switching to other themes (like marfa and mnml) and I get the same results.

Is anyone else seeing the same problem?

If you perform a full rebuild of the test site while keeping an eye on the logs, does anything stand out to you?

I see the error about using the .Site.Params.Author.

I thought I had replaced all the references to it, but I’ll have to double check when I get home and make sure that I make my own copies of the base files we use for rss, etc

I just switched back to .117 because I couldn’t get it working. The pages are there but don’t show up in the index.

That’s probably because the build failed due to the .Site.Params.Author error. If you can track down and fix that (along with any other errors), the build should complete successfully and the post will start showing up.

It didn’t seem to be a problem when I was running it locally. I thought it was a warning at this point in the release cycle.

Ah, sorry for the misunderstanding. I thought it was an error causing the build to fail, but if it’s just a notice or warning and the build completes successfully, then it’s probably something else causing the missing posts.

Hello @manton
I’m seeing this in the logs when I rebuild.

I’ve got it set to .140 in my preferences.

I was on the Hugo forums and they said I should check the post dates to make make sure they match up.

The last comment was that it might be building with -DEF.

I’m having the same problem: if I build my custom theme using 0.140, there are no posts. Other pages exist, but no posts in particular. If I change nothing at all except dropping the hugo version to 0.117, the posts suddenly appear.

When your blog is in the broken state, do you see any errors on the Design page, like the example below, or in the logs?

Hmm, maybe there’s something going on with 0.140. :thinking: @manton, have you successfully built blogs on 0.140? I’ve tried with a couple of themes—Marfa and Sumo—and it’s like the posts don’t really exist. The listing on the homepage is empty, and so are the post lists in other places, like sitemap.xml . Regular pages do exist, though.

I’m trying to refresh my memory, but I believe the issue is that Hugo 0.140 removed .Site.Pages, so any theme that uses that instead of .Site.RegularPages will not show any posts.

The pagination changed too and I have at least one work-around for it, but I hadn’t seen that pagerSize error yet. I’ll have to fix that too since that shouldn’t show up as a real error.

Are you sure .Site.Pages are gone? It looks like it’s there, at least in code at the 0.140 tag, and it’s still documented without deprecation notices in the docs (updated January 19).

I tried using .Site.RegularPages but that didn’t make a difference. :cry:

If you have a working example on 0.140, we could start comparing its theme with the ones that are not working.

I tested more today and you’re right, something more significant has changed. I think it’s something with the filtering by post type or something in the front matter. The only way I can get any posts to appear is if I use .Site.RegularPages without any filter at all.

Yeah, I also manage to get pages that way, but not blog posts. I wonder if Hugo has started treating the content directory differently and if it doesn’t like Micro.blog’s year/month/day/ structure for posts.

I’ve been using .RegularPages for a while and have had very little trouble with my local copy other than an error about .Site.Author.

Can we check that it’s looking for post and not posts?

What if we simplify the stack and remove the theme-blank template that loads parameters related to rendering?

@sod no errors. I’m also running this custom template locally in Hugo 0.140 and 0.144, and both site.Pages and site.RegularPages (with and without filtering) return all of my posts. It’s something specific to Hugo 0.144 on Micro.blog that removes any of the posts themselves (where "Type" "post") from the page collections. As you noted, non-post pages still show up in the collections.

@mandaris @indirect If you’re both able to build your sites with 0.140 locally, I’m guessing there’s something going on with the environment on the Micro.blog servers that @manton has to tweak.

This thread makes me feel a bit less crazy. I ran into something similar and decided to shelve it assuming I had something wrong, but maybe I didn’t.