This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-eleventy/src/includes/blocks/index.liquid

20 lines
No EOL
892 B
Text

{%- for block in blocks -%}
{%- case block.type -%}
{%- when 'youtube_player' -%}
{% render "blocks/youtube-player.liquid", url: block.url %}
{%- when 'github_banner' -%}
{% render "blocks/banners/github.liquid", url: block.url %}
{%- when 'npm_banner' -%}
{% render "blocks/banners/npm.liquid", url: block.url, command: block.command %}
{%- when 'rss_banner' -%}
{% render "blocks/banners/rss.liquid", url: block.url, text: block.text %}
{%- when 'hero' -%}
{% render "blocks/hero.liquid", globals: globals, image: block.image, alt: block.alt %}
{%- when 'markdown' -%}
{{ block.text | markdown }}
{%- when 'divider' -%}
{{ block.markup | markdown }}
{%- when 'addon_links' -%}
{% render "blocks/links/addon-links.liquid", popularPosts:collections.popularPosts, links:links %}
{%- endcase -%}
{%- endfor -%}