From 6efc55827fbfbfd44559a296a2106450be99c831 Mon Sep 17 00:00:00 2001 From: Owen Rees Date: Sat, 1 Jul 2023 19:46:11 +0200 Subject: [PATCH] robots and sitemap added --- app/robots.ts | 12 ++++++++++++ app/sitemap.ts | 22 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 app/robots.ts create mode 100644 app/sitemap.ts diff --git a/app/robots.ts b/app/robots.ts new file mode 100644 index 0000000..bb73691 --- /dev/null +++ b/app/robots.ts @@ -0,0 +1,12 @@ +import { MetadataRoute } from "next"; + +export default function robots(): MetadataRoute.Robots { + return { + rules: { + userAgent: "*", + allow: "/", + disallow: "/api/", + }, + sitemap: "https://echecsfrance/sitemap.xml", + }; +} diff --git a/app/sitemap.ts b/app/sitemap.ts new file mode 100644 index 0000000..ad72599 --- /dev/null +++ b/app/sitemap.ts @@ -0,0 +1,22 @@ +import { MetadataRoute } from "next"; + +export default function sitemap(): MetadataRoute.Sitemap { + return [ + { + url: "https://echecsfrance.com", + lastModified: new Date(), + }, + { + url: "https://echecsfrance.com/tournois", + lastModified: new Date(), + }, + { + url: "https://echecsfrance.com/qui-sommes-nous", + lastModified: new Date(), + }, + { + url: "https://echecsfrance.com/contactez-nous", + lastModified: new Date(), + }, + ]; +}