However, my site Archive is only showing the Photos and Links categories. Following is the template code that displays them…what might be happening here?
{{ $list := ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
{{ if gt (len $list) 0 }}
<div class="archive-categories">
<h3>Categories</h3>
<ul>
{{ range $list }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}
Something is very peculiar. Is your blog actually building right now (check logs at Micro.blog? For example, when I go to https://micro.chrislott.org/categories/books – there’s no page there. I would expect there to be if those posts exist with those categories.
Your code should work as is, so I suspect you recently added additional categories and perhaps the blog hasn’t been rebuilt? You can try a full rebuild from the linked to logs above.
When you create a new post, Micro.blog does not do a full rebuild of your site right away. If you have very few posts in a category, that partial build will mean that those categories may not show up. This is done to make sure your recent posts are up fast and right into the timeline. Eventually, the full build will happen (generally) and then that’ll back fill. That’s why archives are sometimes significantly shorter for a little while after a new post.
What @jsonbecker said is exactly right, although usually this happens so quickly that you won’t notice. I’ll look at your blog and see if something is tripping it up. There are probably more optimizations we need to make here.