utilities/snippets_cli_go#10: Special tag support



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: v0.1
Created: 27-Sep-24 14:25



Description

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.



Toggle State Changes

Activity


assigned to @btasker

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 name mainCategory. 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).

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.

verified

mentioned in commit 6899be20aa0d95c4695df249ce0527afd76134da

Commit: 6899be20aa0d95c4695df249ce0527afd76134da 
Author: B Tasker                            
                            
Date: 2024-09-27T15:52:00.000+01:00 

Message

chore: strip out the initial specialtag logic (utilities/snippets_cli_go#10)

+5 -7 (12 lines changed)

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.

mentioned in issue #12