diff --git a/src/app/robots.ts b/src/app/robots.ts new file mode 100644 index 0000000..8b24f40 --- /dev/null +++ b/src/app/robots.ts @@ -0,0 +1,13 @@ +import { baseURL } from "@/constants"; +import { MetadataRoute } from "next"; + +export default function robots(): MetadataRoute.Robots { + return { + rules: { + userAgent: "*", + allow: "/", + disallow: "/private/", + }, + sitemap: `${baseURL}/sitemap.xml`, + }; +} diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts new file mode 100644 index 0000000..94e1252 --- /dev/null +++ b/src/app/sitemap.ts @@ -0,0 +1,19 @@ +import { baseURL } from "@/constants"; +import { MetadataRoute } from "next"; + +export default function sitemap(): MetadataRoute.Sitemap { + return [ + { + url: baseURL, + }, + { + url: `${baseURL}/about`, + }, + { + url: `${baseURL}/cv`, + }, + { + url: `${baseURL}/posts`, + }, + ]; +}