Read Time
Displays estimated reading time based on word count.
Location : layouts/_partials/widgets/meta/read-time.html
Parameters :
| Parameter | Type | Description | Default |
|---|---|---|---|
page | Page | Page context | required |
site | Site | Site context | required |
class | string | Additional CSS classes | - |
key | string | Config key for visibility | "ReadTime" |
Configuration :
yaml
params:
showReadTime: true # Show/hide read time
showReadTimeIcon: true # Show/hide read time icon
readTimeWordsPerMinute: 200 # Reading speed in words per minuteExamples :
go
// Basic usage
{{ partial "widgets/meta/read-time.html" (dict "page" . "site" .Site) }}
// With custom class
{{ partial "widgets/meta/read-time.html" (dict
"page" .
"site" .Site
"class" "reading-time"
) }}
// In metadata flex layout
{{ $metadata := slice
(partial "widgets/meta/date.html" (dict "page" . "site" .Site))
(partial "widgets/meta/read-time.html" (dict "page" . "site" .Site))
}}
{{ partial "layouts/flex.html" (dict
"items" $metadata
"separator" " · "
) }}