From 3c2b794dd114ffaeb9b602f03e312cd8bcee309d Mon Sep 17 00:00:00 2001 From: EFEELE Date: Tue, 15 Apr 2025 13:29:39 -0600 Subject: [PATCH] feat(SEO): Add exclude filter to sitemap - Excludes pages containing "/blog/tags" or "/blog/techs" from the sitemap. - Reduces unnecessary crawling and indexing of non-essential sections. - Improves SEO by focusing the sitemap on more valuable content. --- README.md | 2 +- astro.config.mjs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 65fe067..6cff556 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ β”‚ β”œβ”€β”€ πŸ“blog # All posts page β”‚ β”‚ β”œβ”€β”€ index.astro # Blog home page β”‚ β”‚ β”œβ”€β”€ πŸ“posts # Blog posts - β”œβ”€β”€ β”‚ β”œβ”€β”€ └── index.astro #All posts page + β”œβ”€β”€ β”‚ β”œβ”€β”€ └── index.astro # All posts page β”‚ β”‚ β”œβ”€β”€ πŸ“tags # Blog tags β”‚ β”‚ └── πŸ“techs # Blog technologies β”‚ β”œβ”€β”€ index.astro # Home page diff --git a/astro.config.mjs b/astro.config.mjs index 358a66a..2220bb6 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -8,7 +8,11 @@ import icon from "astro-icon"; // https://astro.build/config export default defineConfig({ site: "https://neonmint.efeele.dev", - integrations: [preact(), icon(), sitemap()], + integrations: [preact(), icon(), sitemap({ + filter: (page) => + !page.includes("/blog/tags") && + !page.includes("/blog/techs"), + }),], vite: { plugins: [tailwindcss()],