From f3e4b3b9d85410026e81c7fb7c58cb97e42179bb Mon Sep 17 00:00:00 2001 From: sergeyyarkov Date: Wed, 25 Feb 2026 08:11:32 +0300 Subject: [PATCH] sitemap --- public/robots.txt | 2 +- src/pages/sitemap.xml.ts | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/public/robots.txt b/public/robots.txt index 2f1d2a2..426f587 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -1,4 +1,4 @@ User-agent: * Allow: / -Sitemap: https://yarkov.tech/sitemap-index.xml \ No newline at end of file +Sitemap: https://yarkov.tech/sitemap.xml \ No newline at end of file diff --git a/src/pages/sitemap.xml.ts b/src/pages/sitemap.xml.ts index 219b30e..36af406 100644 --- a/src/pages/sitemap.xml.ts +++ b/src/pages/sitemap.xml.ts @@ -10,8 +10,8 @@ export async function GET(context: APIContext) { const articles = await getArticleList(); const baseUrls: Array = [ - { loc: `/`, changefreq: "weekly", priority: 1.0 }, - { loc: `/articles/`, changefreq: "weekly", priority: 0.9 }, + { loc: `/`, changefreq: "monthly", priority: 1.0 }, + { loc: `/articles/`, changefreq: "monthly", priority: 0.9 }, { loc: `/projects/`, changefreq: "monthly", priority: 0.8 }, { loc: `/about/`, changefreq: "monthly", priority: 0.7 }, ]; @@ -65,14 +65,15 @@ export async function GET(context: APIContext) { }) .join("")} ${articleUrls - .map((url) => { - return ` - - ${url.loc} - ${url.langs?.map(({ lang, href }) => ``).join("")} - - `; - }) + .map( + (url) => + ` + + ${url.loc} + ${url.langs?.map(({ lang, href }) => ``).join("")} + + ` + ) .join("")} `;