Setting custom metadata in addition to what's in the source of a post

Skip to first unread message

Vinay Sajip

Jun 11, 2021, 5:07:32 PMJun 11
to nikola-discuss

I want to set the updated metadata value automatically based on the file modification time of the source for a post, if a particular configuration value is set in It seems you can't do this easily - metadata either comes from a filename OR the source, and it doesn't look like you can e.g. use a subclass of NikolaMetadata, as it isn't passed a post's source path, just the source text.

It could be done if e.g. Nikola sent a signal after computing the metadata - the source path and already parsed metadata could be passed to a signal handler. But sadly, there's no suitable signal sent :-(

What's the recommended way of achieving what I want?

Thanks & regards,

Vinay Sajip

Reply all
Reply to author
0 new messages