config i18n

This commit is contained in:
juancmandev
2024-07-31 13:41:41 -06:00
parent 16f07bf63b
commit 373a4af4b1
24 changed files with 400 additions and 96 deletions

View File

@ -3,17 +3,18 @@ import Header from "@/components/header.astro";
import Navigation from "@/components/navigation";
import Footer from "@/components/footer";
import "@/styles/globals.css";
import { getLangFromUrl } from "../i18n/utils";
interface Props {
title: string;
description: string;
lang: "en" | "es";
}
const { title, description, lang } = Astro.props;
const lang = getLangFromUrl(Astro.url);
const { title, description } = Astro.props;
---
<!doctype html>
<html lang={lang}>
<head>
<meta charset="UTF-8" />
@ -30,7 +31,13 @@ const { title, description, lang } = Astro.props;
rel="alternate"
title="juancmandev"
type="application/rss+xml"
href={new URL("rss.xml", Astro.site)}
href={new URL("feed.xml", Astro.site)}
/>
<link
rel="alternate"
title="juancmandev"
type="application/rss+xml"
href={new URL("feed.xml", `${Astro.site}/es/`)}
/>
<link rel="sitemap" href="/sitemap-index.xml" />
<meta name="generator" content={Astro.generator} />