Skip to content

Commit 3b2135c

Browse files
committed
Display images with alts on event pages
1 parent e8ab22d commit 3b2135c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/layouts/EventLayout.astro

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { CollectionEntry } from "astro:content";
33
import Head from "@components/Head/index.astro";
44
import BaseLayout from "./BaseLayout.astro";
55
import Image from "@components/Image/index.astro";
6+
import FreeRatioImage from "@components/Image/FreeRatioImage.astro";
67
import RelatedItems from "@components/RelatedItems/index.astro";
78
import { setJumpToState } from "../globals/state";
89
import { getCurrentLocale, getUiTranslator } from "../i18n/utils";
@@ -14,7 +15,7 @@ interface Props {
1415
}
1516
1617
const { entry, title } = Astro.props;
17-
const { Content } = await entry.render();
18+
const { Content, components } = await entry.render();
1819
1920
setJumpToState(null);
2021
@@ -52,7 +53,12 @@ const relatedEvents =
5253
)
5354
}
5455
<div class="rendered-markdown">
55-
<Content />
56+
<Content
57+
components={{
58+
...components,
59+
img: FreeRatioImage,
60+
}}
61+
/>
5662
</div>
5763

5864
{

0 commit comments

Comments
 (0)