import Head from 'next/head' import type * as types from '@/lib/types' import * as config from '@/lib/config' import { getSocialImageUrl } from '@/lib/get-social-image-url' export function PageHead({ site, title, description, pageId, image, url, isBlogPost }: types.PageProps & { title?: string description?: string image?: string url?: string isBlogPost?: boolean }) { const rssFeedUrl = `${config.host}/feed` title = title ?? site?.name description = description ?? site?.description const socialImageUrl = getSocialImageUrl(pageId) || image return ( {site && ( <> )} {config.twitter && ( )} {description && ( <> )} {socialImageUrl ? ( <> ) : ( )} {url && ( <> )} {title} {/* Better SEO for the blog posts */} {isBlogPost && ( )} ) }