Skip to content

Social Media

Manages the social media links displayed on the website. Each item is a MenuItemConfig.

src/config/social-config.ts

export function getSocialLinks(): MenuItemConfig[] {
const social: MenuItemConfig[] = [];
const config = websiteConfig.social;
if (config?.github) {
social.push({
title: 'GitHub',
href: config.github,
icon: IconBrandGithubFilled,
external: true,
});
}
// Other social links: twitter, blueSky, mastodon,
// discord, youtube, linkedin, facebook, instagram,
// tiktok, telegram...
const supportEmail = getMailtoUrl(websiteConfig.mail?.supportEmail);
if (supportEmail) {
social.push({
title: 'Email',
href: supportEmail,
icon: IconMailFilled,
external: true,
});
}
return social;
}

It dynamically generates social media links based on the URLs provided in the website.ts configuration, and also appends an email link if a support email is configured.

Now that you understand the social media configuration, explore these related topics: