Writing dynamic workflow template based on digest count

In the Novu docs (https://docs.novu.co/platform/digest#writing-digest-templates), the digest engine page describes how it is a common use case to show the number of notifcations in the digest, the example given is "John and 5 others liked your photo."

However it's not clear how this can be achieved in Novu and avoid the edge case where if the digest has one notification in it. In the example above, suppose there was one like on a photo, how can we author a template that says "John liked your photo".

Similarly how would you avoid the pluralisation problem: "1 person liked your photo" instead of "3 people liked your photo". It seems like handlebars doesn't have support for this kind of logic.

How would you implement the example in your documentation above?
Was this page helpful?