ideas
ideas copied to clipboard
Get Bard content reading_time
In Statamic 2 I was doing:
{{ bard_field | flatten | join | strip_tags | read_time }}
But in Statamic 3 the data structure has change and it's not working anymore.
Also I've read in the doc that Bard have an option to show estimated reading time at the bottom of the field. It is very nice and it could nice to have access to this data in the frontend with Antlers.
Ah yeah that new calculation is only in the fieldtype's JavaScript. We can look at adding support for Bard fields in the read_time
modifier so you won't have to do your own markup wangjangling. Might be a little while tho.
haha indeed! thank you Jack :)
would need that in the content API too :)
would be great to get that when fetching blog posts for an blog overview page
would need that in the content API too :)
indeed great idea @goellner
FYI this is now a bit easier with the bard_text modifier:
{{ content | raw | bard_text | read_time }}
This should go to the instruction! Thanks @jacksleight