From 85b78284cc868e1e60cad3f4e54fe66c60e6a35a Mon Sep 17 00:00:00 2001 From: Izan Gil <66965250+SrIzan10@users.noreply.github.com> Date: Sat, 25 May 2024 16:41:42 +0200 Subject: [PATCH] feat: add sitemap and robots.txt --- astro.config.mjs | 2 +- public/robots.txt | 4 ++++ src/components/BaseHead.astro | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 public/robots.txt diff --git a/astro.config.mjs b/astro.config.mjs index a33a85a..bd7eb30 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -7,6 +7,6 @@ import tailwind from "@astrojs/tailwind"; // https://astro.build/config export default defineConfig({ - site: 'https://example.com', + site: 'https://srizan.dev', integrations: [mdx(), sitemap(), react(), tailwind()] }); \ No newline at end of file diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..15b4da1 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://srizan.dev/sitemap-index.xml \ No newline at end of file diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index 07c24e6..5aac24f 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -19,6 +19,7 @@ const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props; +