Skip to content

Commit

Permalink
feat(sitemap): generate robots.txt with sitemap reference
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiazom committed Sep 4, 2024
1 parent e1df8b9 commit 1050378
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { MetadataRoute } from "next";

export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: "*",
},
sitemap: new URL("sitemap.xml", process.env.NEXT_PUBLIC_URL).toString(),
};
}

0 comments on commit 1050378

Please sign in to comment.