Skip to content

Commit 41a7949

Browse files
committed
Add author to education resources
1 parent 8050797 commit 41a7949

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/EducationResource/index.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ interface Props {
88
}
99
1010
const { name, featuredImage, featuredImageAlt } = Astro.props;
11+
const authorHTML = (await Astro.slots.render("author")).replace(/\<p[^\>]*\>/gm, "");
1112
1213
---
1314
<li class="col-span-3">
@@ -21,6 +22,7 @@ const { name, featuredImage, featuredImageAlt } = Astro.props;
2122
</div>
2223
<div class="rendered-markdown">
2324
<div class="text-sm">
25+
<h4 set:html={authorHTML} />
2426
<slot name="description" />
2527
</div>
2628
<div class="text-sm leading-8 [&_a]:whitespace-nowrap [&_a]:rounded-full [&_a]:mr-1 [&_a]:py-1 [&_a]:px-2 [&_a]:outline [&_a]:outline-1 [&_a]:outline-[var(--type-magenta-dark)]">

0 commit comments

Comments
 (0)