
Oct 15, 2026 · 2 min read
Translations live in a folder per language and link by filename.
- i18n
Composite
A blog post card. The title is the one link, and the whole card is its target.
The date and reading time sit above the title. On a collection page, CollectionList builds these props from each entry, so you rarely write them by hand.

Oct 15, 2026 · 2 min read
Translations live in a folder per language and link by filename.
---
import PostCard from '@alfadormx/blocks/composite/PostCard.astro';
const post = {
headline: { title: 'Writing in two languages' },
href: '/demos/saas/blog/second-post',
description: 'Translations live in a folder per language and link by filename.',
date: new Date('2026-10-15T12:00:00Z'),
readingTime: 2,
tags: ['i18n'],
image: {
src: '~/assets/images/content/dictionary-page.jpg',
alt: 'An open dictionary showing the entry for Esperanto',
},
};
---
<div class="max-w-sm">
<PostCard {...post} />
</div>Leave out image for a text-only card. readingTime: false hides the reading time.
Oct 15, 2026
Translations live in a folder per language and link by filename.
---
import PostCard from '@alfadormx/blocks/composite/PostCard.astro';
const post = {
headline: { title: 'Writing in two languages' },
href: '/demos/saas/blog/second-post',
description: 'Translations live in a folder per language and link by filename.',
date: new Date('2026-10-15T12:00:00Z'),
readingTime: 2,
tags: ['i18n'],
image: {
src: '~/assets/images/content/dictionary-page.jpg',
alt: 'An open dictionary showing the entry for Esperanto',
},
};
---
<div class="max-w-sm">
<PostCard {...post} image={undefined} readingTime={false} />
</div>langCode picks the date format and the UI strings. Spanish ships with the library; other languages fall back to English, and readMoreLabel overrides the text.

15 oct 2026 · 2 min de lectura
Las traducciones viven en una carpeta por idioma.
---
import PostCard from '@alfadormx/blocks/composite/PostCard.astro';
const post = {
headline: { title: 'Writing in two languages' },
href: '/demos/saas/blog/second-post',
description: 'Translations live in a folder per language and link by filename.',
date: new Date('2026-10-15T12:00:00Z'),
readingTime: 2,
tags: ['i18n'],
image: {
src: '~/assets/images/content/dictionary-page.jpg',
alt: 'An open dictionary showing the entry for Esperanto',
},
};
---
<div class="max-w-sm">
<PostCard
{...post}
headline={{ title: 'Escribir en dos idiomas' }}
href="/es/demos/saas/blog/segunda-entrada"
description="Las traducciones viven en una carpeta por idioma."
langCode="es"
/>
</div>| Prop | Type | Default | Description |
|---|---|---|---|
| headline | HeadlineProps | — | Card title; the title text is the card's one link and its accessible name (default: htmlTag 'h3'). |
| href | string | — | Entry URL; the whole card is one link. |
| description | string | — | Excerpt under the title. |
| image | ImageProps | — | Cover image above the title. |
| tags | string[] | — | Tags in the card footer (default: []). |
| langCode | string | — | Language of the card's dates and UI strings (default: the site's default language). |
| class | string | — | Classes on the card root (`data-entry-card`). |
| eyebrowClass | string | — | Classes on the eyebrow line above the title (`data-entry-card-eyebrow`). |
| tagsClass | string | — | Classes on the tags list (`data-entry-card-tags`). |
| date | Date | — | Publication date, formatted in the card language's locale. |
| readingTime | number | false | — | Minutes to read, shown after the date; `false` or unset hides it. |
| readMoreLabel | string | — | Visual "Read more" text; hidden from assistive tech, since the title is the link (default: per-language string). |