diff options
| author | Sebastien Castiel <sebastien@castiel.me> | 2023-12-13 14:09:24 -0500 |
|---|---|---|
| committer | Sebastien Castiel <sebastien@castiel.me> | 2023-12-13 14:09:24 -0500 |
| commit | 1987b220ad7c4185cbe45796d30ecc79df9e7ed4 (patch) | |
| tree | 690276df949db0b2bb0120b93d94ef85b0465ca4 | |
| parent | 9e2834abc323e9b46803b764b0d04393d437a7cc (diff) | |
Robots.txt and Sitemap.xml
| -rw-r--r-- | src/app/robots.ts | 13 | ||||
| -rw-r--r-- | src/app/sitemap.ts | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/app/robots.ts b/src/app/robots.ts new file mode 100644 index 0000000..5fb07a6 --- /dev/null +++ b/src/app/robots.ts @@ -0,0 +1,13 @@ +import { env } from '@/lib/env' +import { MetadataRoute } from 'next' + +export default function robots(): MetadataRoute.Robots { + return { + rules: { + userAgent: '*', + allow: '/', + disallow: '/groups/', + }, + sitemap: `${env.NEXT_PUBLIC_BASE_URL}/sitemap.xml`, + } +} diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts new file mode 100644 index 0000000..a3b92a1 --- /dev/null +++ b/src/app/sitemap.ts @@ -0,0 +1,13 @@ +import { env } from '@/lib/env' +import { MetadataRoute } from 'next' + +export default function sitemap(): MetadataRoute.Sitemap { + return [ + { + url: env.NEXT_PUBLIC_BASE_URL, + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 1, + }, + ] +} |
