Sayfa.Blocks.Cloud (Sayfa v0.5.0)

Copy Markdown View Source

Shared implementation for tag and category clouds.

Both clouds follow the exact same rendering pipeline; only the data source (tags vs categories), icon, URL prefix, and CSS class prefix differ.

Summary

Functions

Renders a cloud of tags or categories.

Types

cloud_type()

@type cloud_type() :: :tag | :category

Functions

render(assigns, type)

@spec render(map(), cloud_type()) :: String.t()

Renders a cloud of tags or categories.

Options

  • :type:tag or :category (required)
  • :contents — list of all site contents
  • :lang — current language
  • :site — site config