Sayfa.Blocks.ReadingTime (Sayfa v0.5.0)

Copy Markdown View Source

Reading time block.

Renders a <span> with the estimated reading time from content metadata. Reads content.meta["reading_time"] which is populated by the builder's enrichment stage.

Assigns

  • :content — current Sayfa.Content struct with meta["reading_time"]

Examples

<%= @block.(:reading_time) %>