import BLOG from '@/blog.config' import Head from 'next/head' const CommonHead = ({ meta, children }) => { let url = BLOG?.PATH?.length ? `${BLOG.LINK}/${BLOG.SUB_PATH}` : BLOG.LINK let image if (meta) { url = `${url}/${meta.slug}` image = meta.image || '' } const title = meta?.title || BLOG.TITLE const description = meta?.description || BLOG.DESCRIPTION const type = meta?.type || 'website' const keywords = meta?.tags || BLOG.KEYWORDS return ( {title} {BLOG.SEO_GOOGLE_SITE_VERIFICATION && ( )} {JSON.parse(BLOG.ANALYTICS_BUSUANZI_ENABLE) && ( )} {meta?.type === 'article' && ( <> )} {children} ) } export default CommonHead