--- ### ALL PAGES ### layout: themes/[ site.theme.id ]/frontend/core/base ### PAGE CONFIG ### # Hero Section hero: headline: "Blog" headline_accent: "categories" subheadline: "Browse posts by category" --- {{ page.resolved.hero.headline }} {{ page.resolved.hero.headline_accent }} {% iftruthy page.resolved.hero.subheadline %} {{ page.resolved.hero.subheadline }} {% endiftruthy %} {% comment %} Build unique categories list with post counts {% endcomment %} {% assign categories = '' | split: ',' %} {% assign category_counts = '' | split: ',' %} {% for post in site.posts %} {% for category in post.post.categories %} {% assign category_fixed = category | uj_title_case %} {% unless categories contains category_fixed %} {% assign categories = categories | push: category_fixed %} {% comment %} Count posts for this category {% endcomment %} {% assign count = 0 %} {% for p in site.posts %} {% for c in p.post.categories %} {% assign c_fixed = c | uj_title_case %} {% if c_fixed == category_fixed %} {% assign count = count | plus: 1 %} {% break %} {% endif %} {% endfor %} {% endfor %} {% assign category_counts = category_counts | push: count %} {% endunless %} {% endfor %} {% endfor %} {% for category in categories %} {% uj_icon "folder", "fa-5xl text-primary" %} {{ category }} {{ category_counts[forloop.index0] }} {{ category_counts[forloop.index0] | uj_pluralize: 'post', 'posts' }} {% endfor %} {% if categories.size == 0 %} {% uj_icon "folder-open", "fa-4xl text-muted mb-3" %} No categories yet Check back soon for categorized content. {% uj_icon "arrow-left", "me-2" %} Back to blog {% endif %} {{ content | uj_content_format }}
{{ page.resolved.hero.subheadline }}
{{ category_counts[forloop.index0] }} {{ category_counts[forloop.index0] | uj_pluralize: 'post', 'posts' }}
Check back soon for categorized content.