Sayfa.Blocks.RecentContent (Sayfa v0.5.0)

Copy Markdown View Source

Dynamic recent content block.

Groups all content by content_type, excludes "pages", and renders a section for each type that has content (articles, notes, projects, talks, etc.).

Assigns

  • :contents — list of all site contents (injected by block helper)
  • :limit — number of items per type to show (default: 5)

Examples

<%= @block.(:recent_content, limit: 3) %>