dev-master
9999999-dev https://github.com/mdwheele/sculpin-readtimeA Sculpin bundle for calculating read time, similar to Medium.
MIT
The Requires
- php >=5.4.0
- sculpin/sculpin ~2.0@dev
extension bundle sculpin read time
A Sculpin bundle for calculating read time, similar to Medium.
This Sculpin bundle calculates an estimated read time for posts accessible via a post attribute., (*1)
Add mdwheele/sculpin-readtime
as a requirement to your sculpin.json
(if using Sculpin as a phar) or composer.json
(if using Sculpin via Composer)., (*2)
Then, add the bundle to your SculpinKernel
. For example:, (*3)
``` php <?php, (*4)
use Blog\Sculpin\Bundle\ReadTimeBundle\BlogSculpinReadTimeBundle; use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;, (*5)
class SculpinKernel extends AbstractKernel { protected function getAdditionalSculpinBundles() { return [ MdwheeleSculpinReadTimeBundle::class ]; } }, (*6)
## Usage Read time is available as a property called `read_time` on the `page` object.
{{ page.read_time }} ```, (*7)
For more information, see the Sculpin Configuration documentation., (*8)
A Sculpin bundle for calculating read time, similar to Medium.
MIT
extension bundle sculpin read time