Added robots.txt and modified sitemap.xml generation

This commit is contained in:
Cyril Šebek 2024-07-09 15:29:05 +02:00
parent c9c156bd33
commit 9a84d9acbb
Signed by: blboun3
SSH Key Fingerprint: SHA256:n9dMtOPzgsD+CCerUJslEnU2dzVanbaIv0XDQVRVjeg
3 changed files with 16 additions and 1 deletions

View File

@ -22,7 +22,17 @@ export default defineConfig({
syntaxHighlight: false,
rehypePlugins: [rehypeSlug, [rehypePrettyCode, { theme: "github-dark" }]],
}),
sitemap(),
sitemap({
i18n: {
defaultLocale: "en",
locales: {
en: "en-US",
de: "de-DE",
cs: "cs-CZ",
fr: "fr-FR"
}
}
}),
react(),
],
i18n: {

4
public/robots.txt Normal file
View File

@ -0,0 +1,4 @@
User-agent: *
Allow: /
Sitemap: https://cyrilsebek.cz/sitemap-index.xml

View File

@ -13,6 +13,7 @@ const t = useTranslations(lang)
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="sitemap" href="/sitemap-index.xml" />
<meta name="description" content={description} />
<meta name="author" content="Cyril Šebek" />
<meta name="generator" content={Astro.generator} />