Skip to content

Commit

Permalink
feat: add robot.txt and sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
ridhozhr10 committed Jun 1, 2024
1 parent b97f4d5 commit 9066f48
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/app/robots.ts
Original file line number Diff line number Diff line change
@@ -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`,
};
}
19 changes: 19 additions & 0 deletions src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -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`,
},
];
}

0 comments on commit 9066f48

Please sign in to comment.