Conversation
|
Thanks a lot for this interesting idea. It would indeed give some extra flexibility. When I was reviewing the code, though, the duplicated template rendering gave me an idea: what if it were possible to simply add front matter to the content template itself? Perhaps we could detect when the content template starts with I'm not 100% sure of the approach, and yes it's a little more hidden as a feature, but specifying front matter in the content template actually strikes me as fairly natural, and could be documented clearly in the readme as well of course. What do you think? |
That sounds good, it makes sense to keep the rendering in one place and one setting. It should be intuitive to place the front matter with |
Title
Add support for custom Handlebars templates in activity frontmatter
Description
This PR introduces the ability to customize the frontmatter of imported activities using Handlebars templates, similar to how activity content is currently templated. This offers greater flexibility than the existing list-based property configuration.
Changes
ActivityRendererto use the provided Handlebars template for frontmatter if configured; falls back to the existing property list if not.SettingsTabfor users to input their custom frontmatter template with a helpful description and link to Handlebars docs.README.mdwith instructions and an example of how to use the new frontmatter templating feature.Example
Users can now define frontmatter like this to include dynamic tags, custom URLs, or conditional fields: