Post card
From a page
{% post_card page=page %} fills the title, link, date, image and description from the page. This example uses the newest live article, or a placeholder page if there are none.
Preview
{% post_card page=page %}
Parameters
| Name | Type | Requirement | Default | Choices | Description |
|---|---|---|---|---|---|
page
|
Page
|
Optional | — | — | Page to fill the card from. |
title
|
str
|
Optional | — | — | Post title. |
url
|
str
|
Optional | — | — | Link to the post. |
date
|
date | datetime
|
Optional | — | — | Publish date. |
description
|
str
|
Optional | — | — | One or two sentence summary. |
image_url
|
str
|
Optional | — | — | Card image URL. |
image_alt
|
str
|
Optional |
|
— | Alt text for the image. |
tags
|
list
|
Optional | — | — | Tech tags (objects with name/slug, or strings). |
filter_url
|
str
|
Optional | — | — | Listing URL for tag filter links. |
Select variant preset
Background colour
Viewport width
Zoom level
{% post_card page=page %}
<article class="post-card ">
<div class="post-card__media">
<img src="https://jafacakes-wagtail.s3.amazonaws.com/images/sw_yLx362yM.2e16d0ba.fill-720x480.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAYMTTQDCA3OL2RL4M%2F20261201%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20261201T203506Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=8db4d1784af91b4713e8ade53e0a3f36e28ccb70e7b9232cc5ce55f60de90cb1" alt="" loading="lazy">
</div>
<div class="post-card__body">
<p class="post-card__meta"><time class="post-date pill" datetime="2025-01-10">10 Jan 2025</time>
</p>
<h2 class="post-card__title">
<a class="post-card__link" href="http://jafacak.es/converting-wagtail-pages/">Converting Django models and Wagtail pages</a>
</h2>
<p class="post-card__desc">Discussing the complexities and approaches for converting an existing Wagtail page between page types.</p>
</div>
</article>