Archive and Photos layouts

I changed how the Archive and Photos pages work a few days ago, which had some side effects with certain themes which I’ve now fixed. I just want to document how Micro.blog works in case it’s useful for other plug-in developers.

The pages “Archive” and “Photos” are special in Micro.blog and treated differently than other pages. These used to use Hugo output formats (and still do for the JSON versions). Now Micro.blog creates a file that includes this in the frontmatter (among other things):

title: Archive
layout: list.archivehtml
type: archive

And:

title: Photos
layout: list.photoshtml
type: photos

Hugo will look in layouts/_default/list.archivehtml.html and layouts/_default/list.photoshtml.html. The weird naming is leftover for compatibility with the old way Micro.blog used to work. When processing themes and plug-ins, Micro.blog will copy these templates into _default if needed.

If you have your blog set to show replies, those use a type of “reply”, and the default template for the Replies page is stored in section/replies.html.