The old script was able to detail what language a snippet was written in, but it was only able to do so because of the JSON schema.
Unfortunately, RSS doesn't have a way to show the main category of something.
When I created searchDestination
I included an attribute called specialtag
.
The idea of this is that it can be used to define whether we should be looking for a specific element with a specific ID which contains the main category name (so, language for snippets, category for recipes etc).
This, of course, requires support on the far end but that's fine because templates are under my control.
Activity
27-Sep-24 14:25
assigned to @btasker
27-Sep-24 14:35
Actually, I'm not sure this is going to be workable.
The plan was that templates should be updated to include a
<meta>
element with namemainCategory
. The content should then be whatever we want to appear in that column.However, this element would need to appear within the RSS feed snippet - the search function doesn't fetch individual pages when generating a resultset.
I don't think that's trivial to add (short of manually including the item in the markdown input, which'll leave it prone to human error).
27-Sep-24 14:50
When generating a feed, Nikola passes the post text into
text()
I definitely don't see any sign of it loading a template, and there's nothing in https://github.com/getnikola/nikola/tree/168d9cd5238ec6c0c250576bb337808fc9adb5cf/nikola/data/themes/base/templates
So, I think is probably a non-starter, unfortunately.
27-Sep-24 14:52
mentioned in commit 6899be20aa0d95c4695df249ce0527afd76134da
Message
chore: strip out the initial specialtag logic (utilities/snippets_cli_go#10)
27-Sep-24 14:53
Closing as Won't Fix.
Technically, I could probably write a Nikola plugin to inject something and support this, but that's not something I want to do for now. We can raise a new issue if that ever happens.
28-Sep-24 09:35
mentioned in issue #12