With the hints here and some help from the ask.discourse.com bot I’ve managed to get it working:
- Here’s the relevant commit on top of what the
discourse_themeCLI generated. - Here’s the difference to my previous unsuccessful attempt mentioned in the top post.
Thank you, @NateDhaliwal!
Key things I struggled with on the way here:
- In the templates, neither arbitrary JavaScript expressions (such as function calls) nor filter expressions (of form
some-transormation-function someVariableOrLiteral) work in the double curly braces. Only single variables can be interpolated there. - For one of the two assets, I had forgotten to include the directory name
assets/in the corresponding file path value inabout.json. This failed silently, resulting in the corresponding setting to beundefined, which I guess caused the whole template to be silently omitted or something. - At one point during development, the theme component synched by
discourse_theme watch ...had no effect, whether in preview or explicitly activated. Lettingdiscourse_theme watch ...create a new copy of the component on the instance (and deleting the previous copy) rectified that. Not sure what exactly had happened there.