Intelligent trunctation

I would like to use produce summaries of my posts so that I can display them in brief on sections. I have found page.summary which does what I want but requires manual markup on my posts. That’s possible but as I am porting an existing blog it’s quite a lot of effort. I’ve also tried the truncate filter. That works okay, but only truncates as a string – not something that is HTML aware. So, if it truncates in the middle of a tag, then we end up with broken HTML.

I can work around this, since I am producing the CommonMark that zola acts on via pandoc, but it would seem a bit neater to do this in zola. Is there a context aware method of breaking HTML into bits to produce an approximately sized summary without manual markup?

I have done the same by calling strip tags first

{{ page.content | striptags | truncate }}

Though I agree being able to keep styling would be nice

Thanks! That is not a bad alternative.