From 305d11f5419bdac0a88da90c302fea1d1a78bc67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sun, 27 Oct 2024 00:51:46 +0900 Subject: [PATCH] feat: create `robots.js` --- src/app/robots.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/app/robots.js diff --git a/src/app/robots.js b/src/app/robots.js new file mode 100644 index 0000000..89882b1 --- /dev/null +++ b/src/app/robots.js @@ -0,0 +1,17 @@ +import { WEBSITE_URL } from '@/constants'; + +export default function robots() { + const SITEMAP = 'sitemap.xml'; + + return { + rules: { + userAgent: '*', + allow: '/', + }, + sitemap: [ + `${WEBSITE_URL}/${SITEMAP}`, + `${WEBSITE_URL}/posts/${SITEMAP}`, + `${WEBSITE_URL}/categories/${SITEMAP}`, + ], + }; +}