---
import SiteNav from "../components/SiteNav.astro";
import BuildStamp from "../components/BuildStamp.astro";
import "../styles/global.css";

const { title } = Astro.props;
const canonical = Astro.site
  ? new URL(Astro.url.pathname, Astro.site).href
  : Astro.url.href;
---
<!doctype html>
<html lang="fr">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>{title ? `${title} — Archicratie` : "Archicratie"}</title>

    <link rel="canonical" href={canonical} />
    <link rel="sitemap" href="/sitemap-index.xml" />
  </head>
  <body>
    <header>
      <SiteNav />
    </header>

    <main>
      <article class="reading">
        <slot />
        <BuildStamp />
      </article>
    </main>
  </body>
</html>
