For some reason, I cannot get it to use the “custom_title” from the frontmatter of the posts. It completely ignores that and only uses the “categories”
The index name. This value maps directly to a page param.
I would assume from this part in the docs that custom page parameters should be available, never tried it though. Two ideas: try params.custom_title or some variation of that. And play around with the weight. Maybe the 30 weight is low enough to have more hits in the categories index. Set them to 50 and 50 and print 20 results. If still no custom title index item turns up it’s the custom params that are not available at that point
I cannot get this to work with “title” or “custom_title”. Both of these should work and show related items because the custom_title has text that is used throughout multiple pages.
Is the standard “title” from the front matter a valid index to use? Can you use any item from the frontmatter, including custom params?
Yes, but the types are currently limited to strings (e.g title), string slices (e.g. tags, keywords, categories) and dates. You should get an error for any unsupported type.
I am trying to find a way to have related pages show by category, then have a way for it to include other pages if there aren’t enough related pages on my limit.
I want to have the other non-related pages to be included after the related pages, but in a random manner so that I do not have the same non-related pages appearing throughout the site.
If there aren’t enough related categories, then using another page param results in the non-related pages being in alphabetical order - meaning the same pages get repeated throughout the site.
I understand this is an edge-case. Is this something I would need to use scratch for?