---
title: Article Blocks for Astro
description: "Astro article layouts with author details, lead images, and reading content."
seo:
    title: "Astro Article blocks: examples and source"
sidebar:
    label: "Article"
related:
    - /blocks
    - /components
    - /docs/astro-business-websites
mode: wide
---

## Image header

Lead with an image, then keep the author details close to the article title.

```astro
---
import ArticleImageHeader from "@/components/blocks/article/article-image-header.astro"
import { agentAvatars } from "@/lib/agent-avatars"
import placeholderImage from "@/assets/placeholder.webp"
---

<ArticleImageHeader
  title="How to test a ticket routing rule"
  description="A gnostic AI field note. Run a billing request, a setup question, and an ambiguous ticket through the same rule. Record where each one goes."
  author={{
    image: agentAvatars[0],
    initials: "LM",
    name: "Leila Moreno",
    date: "September 14, 2026",
  }}
  image={{
    src: placeholderImage,
    alt: "Sample image placeholder",
  }}
>
  <p>
    Start with three sample tickets. One asks for a copy of an invoice. One asks
    how to set up an account. The third asks about both. Have the support lead
    write down the expected owner for each before testing the rule.
  </p>
  <p>
    Run the three tickets through the rule without moving them out of the test
    queue. Compare the suggested owners with the expected ones. For the mixed
    request, check that a reviewer receives the original message and can assign
    it.
  </p>
  <p>
    Keep the tickets and their expected owners together. If someone changes the
    rule to handle a new product, run the same three tickets again. A change
    that fixes one assignment can break another.
  </p>
</ArticleImageHeader>
```

```sh
bunx --bun shadcn@latest add @gnostic/article-image-header
```

## Centered header

Center the title and author details before the reading column.

```astro
---
import ArticleCenteredHeader from "@/components/blocks/article/article-centered-header.astro"
import { agentAvatars } from "@/lib/agent-avatars"
import placeholderImage from "@/assets/placeholder.webp"
---

<ArticleCenteredHeader
  title="How to review an AI-drafted reply"
  description="A gnostic AI field note. Read the original question alongside the draft and its sources. Decide whether the reply is ready to send."
  author={{
    image: agentAvatars[1],
    initials: "OP",
    name: "Owen Patel",
    date: "September 9, 2026",
    readingTime: "1 min read",
  }}
  image={{
    src: placeholderImage,
    alt: "Sample image placeholder",
  }}
>
  <p>
    A customer asks whether a returned item needs its original packaging. The
    draft says yes. Before sending it, open the returns policy that the draft
    cites and check which items that sentence covers.
  </p>
  <p>
    In this example the policy mentions fragile items only. If the customer did
    not name the item, the agent can ask which product they bought. The draft
    should keep that question open until the customer answers.
  </p>
  <p>
    Save the original question, the policy passage, and the approved reply as a
    test case. When the policy changes, a reviewer can use the same question to
    check whether new drafts reflect the change.
  </p>
</ArticleCenteredHeader>
```

```sh
bunx --bun shadcn@latest add @gnostic/article-centered-header
```

## Editorial article

Use this section for a case study or journal entry.

```astro
---
import Section from "@/components/blocks/content/content-article-facts/content-article-facts.astro"
import { getImage } from "astro:assets"
import lake from "../../../src/assets/images/mountain-beyond-lake-scene.png"

const lakeUrl = (await getImage({ src: lake, width: 1200, format: "webp" })).src
const section = {
  label: "gnostic AI field notes",
  title: "When an invoice total needs a second look",
  description:
    "Compare the draft record with the invoice and purchase order. Send a mismatch to the accounts team.",
  image: {
    src: lakeUrl,
    alt: "Mountain ridge beyond a lake",
  },
  metadata: [
    {
      label: "Input",
      value: "Invoice and purchase order",
    },
    {
      label: "Reviewer",
      value: "Accounts team",
    },
  ],
  sections: [
    {
      title: "Capture the original",
      description:
        "Keep the invoice beside the draft record so a reviewer can trace each field back to the source.",
    },
    {
      title: "Compare the totals",
      description:
        "In this sample the order total is $240 and the invoice total is $264. Flag the difference and keep the draft out of the posting queue.",
    },
    {
      title: "Record the decision",
      description:
        "The reviewer checks the extra charge against the agreed terms. They approve it or ask the supplier for a corrected invoice.",
    },
  ],
  back: {
    label: "Browse the field notes",
    href: "/blocks/articles#image-grid",
  },
}
---

<Section {...section} />
```

```sh
bunx --bun shadcn@latest add @gnostic/content-article-facts
```

<AutoTypeTable
    path="../../packages/ui/src/components/blocks/content/content-article-facts/types.ts"
    name="ContentArticleFactsProps"
/>

See [serif accent font setup](/ui/docs/installation#serif-accent-fonts-for-editorial-blocks) when installing this section.

## Choose a article layout

Choose an article layout for one long-form page. Keep the title specific and use the description to set the scope. Author and date details should describe the actual publication, not the demo content.

## Pass content from Astro

Pass the heading, author object, and image required by the chosen block. Place the article body in the supported content slot. The template owns collection queries and the route; the reusable block only receives the resulting content.

## Responsive layout and images

Check line length, long headings, code, and tables on small screens. Supply image dimensions through the expected Astro image type and use a crop that still makes sense beside the title. A decorative lead image can have empty alt text; an informative image needs an accurate description.

## Compose the next section

Use [Articles](/ui/blocks/articles) for a listing and [Typeset](/ui/docs/theming#text-and-headings) for prose styles.
