LogoMkSaaS Docs

Social Media

Configuring social media links

Manages social media links displayed on the website, each item is MenuItem.

src/config/social-config.tsx
export function getSocialLinks(): MenuItem[] {
  const socialLinks: MenuItem[] = [];
 
  if (websiteConfig.metadata.social?.github) {
    socialLinks.push({
      title: 'GitHub',
      href: websiteConfig.metadata.social.github,
      icon: <GitHubIcon className="size-4 shrink-0" />,
    });
  }
 
  // Additional social links based on config...
 
  return socialLinks;
}

The function dynamically generates social media links based on the URLs provided in the website.tsx configuration. This ensures consistency between your configuration and what's displayed to users.

Next Steps

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

Table of Contents