Incomplete Category Pages

Hi all. My category pages often end up with just one post when there’s multiple posts under the category. I haven’t figured out how to get category pages to fully populate in a reliable way – sometimes editing a post in a category helps, sometimes not. Sometimes changing the theme helps.

For example, my iOS Shortcuts category shows only one post but there’s 14.

Am I missing something or am I encountering a category regeneration bug? Categories have really never been reliable for me, so this isn’t something that just started happening, but now that I want to add categories as Pages, it is time to check-in :slight_smile:

Thank you for any insights or help on this!

1 Like

For a little while the category problem I have seemed to be fine but it has occurred again – there should be 72 posts but only four show up:
https://www.distortions.net/categories/flowers/

Is there any way to be sure my categories are fully populated when I post to them?

Category pages are some of the last to get built on full site rebuilds. If you wait a bit from your last post, it’ll fully populate eventually.

1 Like

I’m having the exact same issue at the moment. My category pages are being truncated as well and not showing up. I’m sure it something to do with the actual code for generating these pages, which is located in the layouts/list.archivehtml.html page. Here is mine for reference:

{{ define "main" }}
<div class="container">
	<div class="row">
		<div class="nine columns offset-by-three">
	{{ $list := ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
	{{ if gt (len $list) 0 }}
		<div class="archive_categories">
			{{ range $list }}
				<p><a href="{{ .Permalink }}">{{ .Title }}</a></p>
			{{ end }}
		</div>
<hr>
	{{ end }}
	
	{{ $list := (where .Site.Pages "Type" "post") }}
	{{ range $list }}

		<p class="h-entry">
			<a href="{{ .Permalink }}" class="u-url"><span class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05-0700" }}">{{ .Date.Format "2006-01-02" }}</span></a>:
			<span class="p-name"><b>{{ .Title }}</b></span> 
			<span class="p-summary">{{ .Summary | truncate 100 }}</span>
		</p>

	{{ end }}
</div>
</div>
</div>
{{ end }}

Not sure how best to solve this either.

1 Like