--- import Favicon from 'components/layouts/Favicon/Favicon.astro' import IconSVG from 'assets/layouts/Head/favicon.svg' import IconPNG from 'assets/layouts/Head/favicon.png' export interface Props { /** * Site display name */ siteName?: string | undefined /** * Page Title */ title?: string | undefined /** * Page description */ description?: string | undefined /** * define the cannonical url */ canonical?: string | false | undefined /** * OpenGraph image(s) */ image?: typeof IconPNG | Array | undefined /** * Twitter/X Specific options */ twitter?: { title?: string | undefined card?: "summary" | "summary_large_image" | "app" | "player" | undefined site?: string | undefined creator?: string | undefined } | undefined /** * OpenGraph Specific options (override defaults set by other options) */ og?: { title?: string | undefined type?: string | undefined description?: string | undefined url?: string | undefined } | undefined } const props = Astro.props const image = props.image ? Array.isArray(props.image) ? props.image : [props.image] : undefined const canonical = typeof Astro.props.canonical === 'string' ? Astro.props.canonical : Astro.props.canonical === false ? undefined : Astro.url.href --- {props.siteName && ( )} {props.title && ( {props.title} // )} {props.description && ( )} {canonical && ( )} {props.twitter?.site && ( )} {props.twitter?.creator && ( )} {(props.twitter?.title ?? props.title) && ( )} {(props.og?.title ?? props.title) && ( )} {(props.og?.description ?? props.description) && ( )} {(props.og?.url ?? canonical) && ( )} {image?.map((img) => ( ))}