Skip to content

Commit a2542a7

Browse files
committedMar 8, 2024·
🐛 fix: fix sitemap config
1 parent dbcde3f commit a2542a7

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed
 

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ next-env.d.ts
5757
public/*.js
5858
bun.lockb
5959
sitemap*.xml
60+
robots.txt
61+

‎next-sitemap.config.mjs

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ import { glob } from 'glob';
22

33
const isVercelPreview = process.env.VERCEL === '1' && process.env.VERCEL_ENV !== 'production';
44

5-
const prodUrl = process.env.SITE_URL || 'https://chat-preview.lobehub.com';
6-
75
const vercelPreviewUrl = `https://${process.env.VERCEL_URL}`;
86

9-
const siteUrl = isVercelPreview ? vercelPreviewUrl : prodUrl;
7+
const siteUrl = isVercelPreview ? vercelPreviewUrl : 'https://chat-preview.lobehub.com';
108

119
/** @type {import('next-sitemap').IConfig} */
1210
const config = {
@@ -49,6 +47,7 @@ const config = {
4947
return paths;
5048
},
5149
siteUrl,
50+
generateRobotsTxt: true,
5251
};
5352

5453
export default config;

‎public/robots.txt

-4
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.