From 40ffc6eef1c037abba6a8ea34149d68b87f7c635 Mon Sep 17 00:00:00 2001 From: ruru <142723369+ruru-m07@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:39:44 +0530 Subject: [PATCH] chore(sitemap): update sitemap config and sitemap.xml --- apps/www/next-sitemap.config.js | 16 -------- apps/www/public/robots.txt | 3 ++ apps/www/public/sitemap-0.xml | 67 +++++++++++++++++---------------- 3 files changed, 37 insertions(+), 49 deletions(-) diff --git a/apps/www/next-sitemap.config.js b/apps/www/next-sitemap.config.js index 150c9f6..88dd169 100644 --- a/apps/www/next-sitemap.config.js +++ b/apps/www/next-sitemap.config.js @@ -1,30 +1,14 @@ -const { execSync } = require("child_process"); - /** @type {import('next-sitemap').IConfig} */ module.exports = { siteUrl: process.env.SITE_URL || "https://ruru-ui.vercel.app", generateRobotsTxt: true, exclude: ["/api/*"], transform: async (config, path) => { - const lastmod = await getLastModifiedDate(path); return { loc: path, changefreq: config.changefreq, priority: config.priority, - lastmod, alternateRefs: config.alternateRefs ?? [], }; }, }; - -async function getLastModifiedDate(path) { - try { - const timestamp = execSync(`git log -1 --format=%ct ${path}`) - .toString() - .trim(); - return new Date(parseInt(timestamp, 10) * 1000).toISOString(); - } catch (error) { - console.error(`Error getting last modified date for ${path}:`, error); - return new Date().toISOString(); // Fallback to current date - } -} diff --git a/apps/www/public/robots.txt b/apps/www/public/robots.txt index a4690f9..685b79c 100644 --- a/apps/www/public/robots.txt +++ b/apps/www/public/robots.txt @@ -2,5 +2,8 @@ User-agent: * Allow: / +# Host +Host: https://ruru-ui.vercel.app + # Sitemaps Sitemap: https://ruru-ui.vercel.app/sitemap.xml diff --git a/apps/www/public/sitemap-0.xml b/apps/www/public/sitemap-0.xml index fada55a..6ccf3fb 100644 --- a/apps/www/public/sitemap-0.xml +++ b/apps/www/public/sitemap-0.xml @@ -1,36 +1,37 @@ -https://ruru-ui.vercel.app/color2024-09-19T13:01:48.136Zdaily0.7 -https://ruru-ui.vercel.app/playground2024-09-19T13:01:48.366Zdaily0.7 -https://ruru-ui.vercel.app/blocks/login-12024-09-19T13:01:48.627Zdaily0.7 -https://ruru-ui.vercel.app/blocks/register-12024-09-19T13:01:49.034Zdaily0.7 -https://ruru-ui.vercel.app/blocks/forgot-12024-09-19T13:01:49.467Zdaily0.7 -https://ruru-ui.vercel.app/theme__2024-09-19T13:01:49.716Zdaily0.7 -https://ruru-ui.vercel.app/sponsors2024-09-19T13:01:50.000Zdaily0.7 -https://ruru-ui.vercel.app2024-09-19T13:01:50.303Zdaily0.7 -https://ruru-ui.vercel.app/docs/animation2024-09-19T13:01:50.579Zdaily0.7 -https://ruru-ui.vercel.app/docs/block2024-09-19T13:01:50.826Zdaily0.7 -https://ruru-ui.vercel.app/docs/cli2024-09-19T13:01:51.081Zdaily0.7 -https://ruru-ui.vercel.app/docs/dark-mode2024-09-19T13:01:51.334Zdaily0.7 -https://ruru-ui.vercel.app/docs/hooks2024-09-19T13:01:51.578Zdaily0.7 -https://ruru-ui.vercel.app/docs2024-09-19T13:01:51.780Zdaily0.7 -https://ruru-ui.vercel.app/docs/installation2024-09-19T13:01:52.025Zdaily0.7 -https://ruru-ui.vercel.app/docs/provider2024-09-19T13:01:52.231Zdaily0.7 -https://ruru-ui.vercel.app/docs/ruru-json2024-09-19T13:01:52.420Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/avatar2024-09-19T13:01:52.683Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/badge2024-09-19T13:01:52.876Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/button2024-09-19T13:01:53.131Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/checkbox2024-09-19T13:01:53.356Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/form2024-09-19T13:01:53.544Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/input2024-09-19T13:01:53.758Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/label2024-09-19T13:01:53.997Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/modal2024-09-19T13:01:54.221Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/select2024-09-19T13:01:54.408Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/spinner2024-09-19T13:01:54.635Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/switch2024-09-19T13:01:54.854Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/tabs2024-09-19T13:01:55.093Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/textarea2024-09-19T13:01:55.282Zdaily0.7 -https://ruru-ui.vercel.app/docs/components/tooltip2024-09-19T13:01:55.480Zdaily0.7 -https://ruru-ui.vercel.app/blocks2024-09-19T13:01:55.645Zdaily0.7 -https://ruru-ui.vercel.app/theme2024-09-19T13:01:55.883Zdaily0.7 +https://ruru-ui.vercel.app/theme__daily0.7 +https://ruru-ui.vercel.app/colordaily0.7 +https://ruru-ui.vercel.app/blocks/login-1daily0.7 +https://ruru-ui.vercel.app/blocks/register-1daily0.7 +https://ruru-ui.vercel.app/blocks/forgot-1daily0.7 +https://ruru-ui.vercel.appdaily0.7 +https://ruru-ui.vercel.app/playgrounddaily0.7 +https://ruru-ui.vercel.app/docs/animationdaily0.7 +https://ruru-ui.vercel.app/docs/blockdaily0.7 +https://ruru-ui.vercel.app/docs/clidaily0.7 +https://ruru-ui.vercel.app/docs/dark-modedaily0.7 +https://ruru-ui.vercel.app/docs/hooksdaily0.7 +https://ruru-ui.vercel.app/docsdaily0.7 +https://ruru-ui.vercel.app/docs/installationdaily0.7 +https://ruru-ui.vercel.app/docs/providerdaily0.7 +https://ruru-ui.vercel.app/docs/ruru-jsondaily0.7 +https://ruru-ui.vercel.app/docs/components/avatardaily0.7 +https://ruru-ui.vercel.app/docs/components/badgedaily0.7 +https://ruru-ui.vercel.app/docs/components/buttondaily0.7 +https://ruru-ui.vercel.app/docs/components/checkboxdaily0.7 +https://ruru-ui.vercel.app/docs/components/dropzonedaily0.7 +https://ruru-ui.vercel.app/docs/components/formdaily0.7 +https://ruru-ui.vercel.app/docs/components/inputdaily0.7 +https://ruru-ui.vercel.app/docs/components/labeldaily0.7 +https://ruru-ui.vercel.app/docs/components/modaldaily0.7 +https://ruru-ui.vercel.app/docs/components/selectdaily0.7 +https://ruru-ui.vercel.app/docs/components/spinnerdaily0.7 +https://ruru-ui.vercel.app/docs/components/switchdaily0.7 +https://ruru-ui.vercel.app/docs/components/tabsdaily0.7 +https://ruru-ui.vercel.app/docs/components/textareadaily0.7 +https://ruru-ui.vercel.app/docs/components/tooltipdaily0.7 +https://ruru-ui.vercel.app/sponsorsdaily0.7 +https://ruru-ui.vercel.app/themedaily0.7 +https://ruru-ui.vercel.app/blocksdaily0.7 \ No newline at end of file