Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pages/[username].js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ export async function getServerSideProps(context) {
log.info(`data loaded for username: ${username}`);

try {
profile.cleanBio = String(await remark().use(strip).process(profile.bio));
const processedBio = await remark().use(strip).process(profile.bio);
profile.cleanBio = processedBio.toString();
} catch (e) {
log.error(e, `cannot strip markdown for: ${username}`);
profile.cleanBio = profile.bio;
}

return {
Expand All @@ -57,7 +59,7 @@ export default function User({ data, BASE_URL }) {
description={data.cleanBio}
ogTitle={data.name}
ogUrl={`https://linkfree.eddiehub.io/${data.username}`}
ogImage={data.avatar}
ogImage={`https://github.com/${data.username}.png`}
ogType="image/png"
/>

Expand Down