Skip to content

Commit faac3c2

Browse files
author
jeff
committed
Merge PR BIT-DataLab#34: SEO optimization
2 parents 2bf2020 + 206bbaf commit faac3c2

3 files changed

Lines changed: 52 additions & 0 deletions

File tree

apps/web/next-env.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
import "./.next/types/routes.d.ts";
4+
5+
// NOTE: This file should not be edited
6+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/web/src/app/robots.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { MetadataRoute } from "next";
2+
3+
export const dynamic = "force-static";
4+
5+
export default function robots(): MetadataRoute.Robots {
6+
return {
7+
rules: {
8+
userAgent: "*",
9+
allow: "/",
10+
disallow: "/api/",
11+
},
12+
sitemap: "https://editbanana.anxin6.cn/sitemap.xml",
13+
};
14+
}

apps/web/src/app/sitemap.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import type { MetadataRoute } from "next";
2+
3+
export const dynamic = "force-static";
4+
5+
export default function sitemap(): MetadataRoute.Sitemap {
6+
return [
7+
{
8+
url: "https://editbanana.anxin6.cn",
9+
lastModified: new Date(),
10+
changeFrequency: "weekly",
11+
priority: 1,
12+
},
13+
{
14+
url: "https://editbanana.anxin6.cn/examples",
15+
lastModified: new Date(),
16+
changeFrequency: "weekly",
17+
priority: 0.8,
18+
},
19+
{
20+
url: "https://editbanana.anxin6.cn/about",
21+
lastModified: new Date(),
22+
changeFrequency: "monthly",
23+
priority: 0.5,
24+
},
25+
{
26+
url: "https://editbanana.anxin6.cn/pricing",
27+
lastModified: new Date(),
28+
changeFrequency: "monthly",
29+
priority: 0.7,
30+
},
31+
];
32+
}

0 commit comments

Comments
 (0)