import Link from 'next/link'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faGithub, faMastodon, faLinkedin } from '@fortawesome/free-brands-svg-icons'; import { siteConfig } from '@/lib/config'; import { getAllTagsWithCount } from '@/lib/posts'; import { allPages } from 'contentlayer/generated'; export function RightSidebar() { const tags = getAllTagsWithCount().slice(0, 5); const aboutPage = allPages.find((p) => p.title.includes('關於作者')) ?? allPages.find((p) => p.slug === 'about-me'); const avatarSrc = siteConfig.avatar; const socialItems = [ siteConfig.social.github && { key: 'github', href: siteConfig.social.github, icon: faGithub, label: 'GitHub' }, siteConfig.social.mastodon && { key: 'mastodon', href: siteConfig.social.mastodon, icon: faMastodon, label: 'Mastodon' }, siteConfig.social.linkedin && { key: 'linkedin', href: siteConfig.social.linkedin, icon: faLinkedin, label: 'LinkedIn' } ].filter(Boolean) as { key: string; href: string; icon: any; label: string }[]; return ( ); }