From 59e9e608a5d82357803cba199dca43897670619e Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Mon, 12 Jun 2023 23:05:26 +0200 Subject: [PATCH] feat: Generate `robots.txt` --- app/robots.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/robots.ts diff --git a/app/robots.ts b/app/robots.ts new file mode 100644 index 0000000..2ba1b31 --- /dev/null +++ b/app/robots.ts @@ -0,0 +1,14 @@ + +import { MetadataRoute } from 'next' +import { metadata } from './layout' + +export default function robots(): MetadataRoute.Robots { + return { + rules: { + userAgent: '*', + allow: '/', + disallow: '/private/', + }, + sitemap: `${metadata.metadataBase}sitemap.xml`, + } +}