---
export interface Props {
  title: string | undefined;
  description: 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 | Software Engineer, Web Developer, Consultant";

let { title = defaultTitle, description = defaultDescription } = Astro.props;

const baseURL = "https://ayo.ayco.io";
---

<head>
  <title>{title}</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="/ayo.png" />

  <link rel="me" href="https://social.ayco.io/@ayo" />
  <link rel="me" href="https://mastodon.ph/@ayo" />
  <link rel="me" href="https://shrediverse.net/@ayo" />
  <link rel="me" href="https://stop.voring.me/@ayo" />
  <link rel="me" href="https://metapixl.com/@ayo" />

  <link rel="shortcut icon" type="image/png" href="/favicon.ico" />

  {
    title !== defaultTitle ? (
      <script>
        const title = document.title; 
        const defaultTitle = "Ayo Ayco | Software Engineer, Web Developer, Consultant"
        if(title) {
          (document.title = `${title} | ${defaultTitle}`)
        }
      </script>
    ) : (
      <meta />
    )
  }
</head>
