aboutsummaryrefslogtreecommitdiff
path: root/src/layouts/Layout.astro
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-04-21 22:54:15 +0200
committerAriel Costas Guerrero <ariel@costas.dev>2025-04-21 22:54:15 +0200
commitb4ef1a0d288565f744bf754af456c4f60da99ca7 (patch)
tree907c88a2e59370a0b06dbd60aa1cc297b67b004b /src/layouts/Layout.astro
parente96af5ce5e8dd00cf8a31d4812f416583defa449 (diff)
Refactor localization: remove i18n support and update layouts to use static text
Diffstat (limited to 'src/layouts/Layout.astro')
-rw-r--r--src/layouts/Layout.astro25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 30251ae..97115b5 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -3,16 +3,14 @@ import "@fontsource/beiruti";
import "@fontsource-variable/sen";
import Header from "../partials/Header.astro";
import Footer from "../partials/Footer.astro";
-import { getAbsoluteLocaleUrl } from "astro:i18n";
-import { getUrlWithoutLocale } from "../i18n";
interface Props {
title: string;
description: string;
+ empty?: boolean;
}
-const { title, description } = Astro.props;
-const urlWithoutLocale = getUrlWithoutLocale(Astro.url.pathname);
+const { title, description, empty } = Astro.props;
---
<!doctype html>
@@ -23,21 +21,6 @@ const urlWithoutLocale = getUrlWithoutLocale(Astro.url.pathname);
<meta name="viewport" content="width=device-width" />
<link rel="canonical" href={Astro.url.toString().replace(/\.html$/, "")} />
- <link
- rel="alternate"
- hreflang="es"
- href={getAbsoluteLocaleUrl("es", urlWithoutLocale)}
- />
- <link
- rel="alternate"
- hreflang="en"
- href={getAbsoluteLocaleUrl("en", urlWithoutLocale)}
- />
- <link
- rel="alternate"
- hreflang="x-default"
- href={getAbsoluteLocaleUrl("es", urlWithoutLocale)}
- />
<link rel="alternate" type="application/rss+xml" href="/blog.xml" />
<link rel="sitemap" type="application/xml" href="/sitemap-index.xml" />
@@ -62,11 +45,11 @@ const urlWithoutLocale = getUrlWithoutLocale(Astro.url.pathname);
<slot name="head-jsonld" />
</head>
<body>
- <Header />
+ {empty ? null : <Header />}
<main>
<slot />
</main>
- <Footer />
+ {empty ? null : <Footer />}
</body>
</html>