Skip to content

Commit 2d3902c

Browse files
committed
feat(author): support linked HTML bio in post author card
Render `SITE.authorBio` via `set:html` in the post layout so rich links can be defined in config, and add scoped link styling for the author bio section.
1 parent 94c2fd8 commit 2d3902c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const SITE = {
4141
authorImage: " https://pbs.twimg.com/profile_images/1884210412524027905/jW4NB4rx_400x400.jpg", // Example: https://pbs.twimg.com/profile_images/1272979356529221632/sxvncugt_400x400.jpg, https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png
4242
// Author: Bio
4343
authorBio:
44-
"Solopreneuer. Building Coolify.io in public an open-source & self-hostable Heroku / Netlify / Vercel alternative.",
44+
'Founder of <a href="https://coollabs.io" target="_blank" rel="noopener">coollabs.io</a> | <a href="https://coolify.io" target="_blank" rel="noopener">coolify.io</a> | <a href="https://jean.build" target="_blank" rel="noopener">jean.build</a> | <a href="https://serverlesshorrors.com" target="_blank" rel="noopener">serverlesshorrors.com</a> | <a href="https://llmhorrors.com" target="_blank" rel="noopener">llmhorrors.com</a> | <a href="https://fonts.coollabs.io" target="_blank" rel="noopener">fonts.coollabs.io</a> | ❤️ OSS & simplicity | 2 x dad, Entrepreneur.',
4545
};
4646

4747
// Ink - Theme configuration

src/layouts/post.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const AUTHOR_AVATAR = content.authorImage
184184
{AUTHOR_NAME}
185185
</span>
186186
)}
187-
<p class="author-card__bio">{SITE.authorBio}</p>
187+
<p class="author-card__bio" set:html={SITE.authorBio} />
188188
<br />
189189
{USE_SUBSCRIPTION ? (
190190
<form action="" class="subscription-form">
@@ -273,6 +273,9 @@ const AUTHOR_AVATAR = content.authorImage
273273
.author-card__bio {
274274
@apply text-white;
275275
}
276+
.author-card__bio :global(a) {
277+
@apply text-theme-primary hover:underline;
278+
}
276279

277280
.subscription-form {
278281
@apply w-4/6 mt-2 flex flex-row rounded-lg overflow-hidden shadow-lg;

0 commit comments

Comments
 (0)