Sayfa.Blocks.Breadcrumb (Sayfa v0.5.0)

Copy Markdown View Source

Back-link block with JSON-LD structured data.

Renders a minimal ← Section back link for section content (e.g. articles, notes) and a <script type="application/ld+json"> tag with BreadcrumbList schema for SEO. Bare pages (no url_prefix) emit only the JSON-LD.

  • /articles/hello/ → renders ← Articles back link
  • /about/ → no back link (JSON-LD only)
  • List/home pages (no @content) → no output

Assigns

  • :content — current Sayfa.Content struct (nil on list/home pages)
  • :site — site config map with :base_url

Examples

<%= @block.(:breadcrumb, []) %>