{% extends "base.html" %} {% from "chirpui/layout.html" import container, stack %} {% from "chirpui/metric_grid.html" import metric_card, metric_grid %} {% from "chirpui/profile_header.html" import profile_header %} {% from "chirpui/rendered_content.html" import rendered_content %} {% from "partials/taxonomy-pages.html" import count_label, social_links, taxonomy_post_feed %} {% block content %} {% let author_key = params?.author_name ?? page?.author_name ?? page?.title ?? "Author" %} {% let authors_registry = site?.data?.authors ?? {} %} {% let author_data = authors_registry.get(author_key, {}) if author_key else {} %} {% let author_name = author_data?.name ?? page?.title ?? author_key %} {% let author_bio = author_data?.bio ?? params?.bio ?? page?.description ?? none %} {% let author_social = author_data?.social ?? params?.social ?? {} %} {% let author_index = site?.indexes?.author ?? {} %} {% let indexed_posts = (author_index.get(author_key) | resolve_pages) if author_index.get(author_key) else [] %} {% let author_posts = posts ?? indexed_posts %} {% call container(cls="chirp-theme-taxonomy-page chirp-theme-author-page") %} {% call stack(gap="lg") %} {% call profile_header(name=author_name, use_slots=true, cls="chirp-theme-author-header") %} {% slot bio %} {% if author_bio %}
{{ author_bio }}
{% end %} {% end %} {% slot stats %} {{ count_label(author_posts | length, "published page") }} {% end %} {% slot actions %} {{ social_links(author_social) }} {% end %} {% end %} {% if content %} {% call rendered_content(compact=true) %}{{ content | safe }}{% end %} {% end %} {% call metric_grid(cols=2, gap="md") %} {{ metric_card(value=author_posts | length, label="Published") }} {{ metric_card(value=author_name, label="Author") }} {% end %} {{ taxonomy_post_feed(author_posts, "No content has been published by this author yet.", variant="compact") }} {% end %} {% end %} {% end %}