---
// Import the global.css file here so that it is included on
// all pages through the use of the <BaseHead /> component.
import "../../styles/global.css"
const { title, description, image = "/preview.png" } = Astro.props
import { SITE_URL } from "../../consts"
const { pathname } = Astro.url;
---

<!-- Global Metadata -->
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
  <meta name="generator" content={Astro.generator} />

<!-- Primary Meta Tags -->
  <title>拔电关机</title>
  <meta name="title" content={title} />
  <meta name="description" content={description} />

<!-- Open Graph / Facebook -->
  <meta property="og:type" content="website" />
  <meta property="og:url" content={`${SITE_URL}${pathname}`} />
  <meta property="og:title" content={title} />
  <meta property="og:description" content={description} />
  <meta property="og:image" content={new URL(image, `${SITE_URL}${pathname}`)} />

<!-- Twitter -->
  <meta property="twitter:card" content="summary_large_image" />
  <meta property="twitter:url" content={`${SITE_URL}${pathname}`} />
  <meta property="twitter:title" content={title} />
  <meta property="twitter:description" content={description} />
  <meta property="twitter:image" content={new URL(image, `${SITE_URL}${pathname}`)} />
