jalendport / craft-readtime Goto Github PK
View Code? Open in Web Editor NEWCalculate the estimated read time for content.
License: MIT License
Calculate the estimated read time for content.
License: MIT License
Will you be updating this plugin for craft 4?
Is there any way to make this work with Neo fields? Currently if I pass in the the Neo field it always outputs 0. If I pass in the whole entry it always outputs 5.
I am on the latest craft version and the |readTime(false) filter send back a TimeModel with 0 minutes and 0 seconds anytime.
I tried it on the entry (a blogentry with a matrix field).
And I tried it to use with the matrix field itself (wich holds a redactor field).
I did even try to use it directly on the matrix block itself (not on the array of blocks)
Nothing worked sadly :(.
Very useful plugin.
I am preparsing the read time to a custom field on saving an entry for improved performance in my templates. The plugin honors my cp-Language and correctly uses »12 Minuten« instead of »12 minutes«. If however I am resaving entries via console using resave/entries
which I need to do from time to time, all read time values in my custom field are being saved in the english version again.
Is there a way to lock the locale to, say, de-DE?
I'd find this very useful.
I'd like to make the word "minutes" into a singular adjective, thus:
"10 minute read" as in, "This article is a ten-minute read."
Possible?
I can't find it and would love to make Less than a minute
just show 1 minute
instead.
It would be great if you could access the readtime of a matrix field, like so:
{{ readTime(entry.matrixField) }}
Currently this just results in:
Calling unknown method: craft\elements\db\MatrixBlockQuery::getFieldLayout()
Thanks!
I noticed that readTime
filter does not strip HTML from strings - this can sometimes giver false results.
{{ time.interval('%h hours, %i minutes, $s seconds') }}
$s > %s
src\twigextensions\ReadTimeTwigExtension.php
Getting twig error
There are references to getFieldLayout()->getFields() in the above file
Had to change this locally to getFieldLayout()->getCustomFields()
to fix
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.