ayco.io-astro/src/components/Head.astro

53 lines
2 KiB
Text

---
export interface Props {
title?: string | undefined
description?: string | undefined
ogImage?: string | undefined
}
const defaultDescription =
'Professional software engineer specializing in web development with a decade of experience building web applications for both private businesses and government-funded high-impact projects utilizing web technologies, IoT, data viz/insights, remote sensing, and GIS'
const defaultTitle = 'Ayo Ayco - Web Dev, Engineer, Leader, Thinker'
const defaultOgImage = 'ayo.png'
let {
title,
description = defaultDescription,
ogImage = defaultOgImage,
} = Astro.props
const baseURL = Astro.site?.toString().slice(0, -1) // ?? 'https://ayo.ayco.io'
---
<head>
<title>{title ? `${title} | ${defaultTitle}` : defaultTitle}</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<meta name="theme-color" content="#3054bf" />
<meta name="description" content={description} />
<meta name="author" content="Ayo Ayco" />
<meta name="origin" content={baseURL + Astro.url.pathname} />
<!-- Open Graph data -->
<meta property="og:site_name" content="Ayo Ayco" />
<meta property="og:type" content="website" />
<meta property="og:url" content={baseURL + Astro.url.pathname} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={`/${ogImage}`} />
<!-- Links -->
<link rel="canonical" href={baseURL + Astro.url.pathname} />
<link rel="sitemap" href="/sitemap-index.xml" />
<link rel="me" href="https://ayos.blog" />
<link rel="me" href="https://social.ayco.io/@ayo" />
<link rel="me" href="https://m.webtoo.ls/@ayo" />
<link rel="me" href="https://fosstodon.org/@ayo" />
<link rel="me" href="https://metapixl.com/@ayo" />
<!-- Icons -->
<link rel="icon" href="favicon.svg" />
<link rel="mask-icon" href="mask-icon.svg" color="#000000" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
</head>