I have been trying to use a different partial on the home page dependent on the category of the post however using a simply if as I would do with standard Hugo doesn’t work.
I would like one category to show all the post content and another to show a truncated version with read more.
Well, at least in the above, you’re trying to use a Site level variable when you’re trying to reference a content level parameter. This will work using .Params.categories within the range loop over your pages.
Thanks Jason. Tried a few variations of this to try and deal with the quirkiness of micro.blog being slightly different on some things, but no joy. I was expecting Site.Taxonomies.categories "links" to work, but alas.
.Site.Taxonomies.categories will refer to the list of categories on your site since that’s a site variable. There are .Site and .Page variables – and you’re referring to the global stuff.
Returns a collection of term pages for terms defined on the given page in the given taxonomy, ordered according to the sequence in which they appear in front matter.
You have to use .Page methods to get data that is specific to a piece of content versus .Site methods which are scoped site wide.