File tree Expand file tree Collapse file tree 8 files changed +98
-10
lines changed Expand file tree Collapse file tree 8 files changed +98
-10
lines changed Original file line number Diff line number Diff line change @@ -6,3 +6,7 @@ NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
66# Basin Form Endpoint for Static Form Submissions
77# Replace this with your actual Basin form endpoint (e.g., https://usebasin.com/f/your-form-id)
88NEXT_PUBLIC_BASIN_ENDPOINT = https://usebasin.com/f/your-form-id-here
9+
10+ # Site URL Configuration
11+ # Used for generating absolute URLs in sitemap and other contexts
12+ NEXT_PUBLIC_SITE_URL = https://roocode.com
Original file line number Diff line number Diff line change @@ -40,3 +40,7 @@ yarn-error.log*
4040# typescript
4141* .tsbuildinfo
4242next-env.d.ts
43+
44+ # generated files
45+ /public /sitemap * .xml
46+ /public /robots.txt
Original file line number Diff line number Diff line change 1+ enable-pre-post-scripts = true
Original file line number Diff line number Diff line change 1+ /** @type {import('next-sitemap').IConfig } */
2+ module . exports = {
3+ siteUrl : process . env . NEXT_PUBLIC_SITE_URL || 'https://roocode.com' ,
4+ generateRobotsTxt : true ,
5+ generateIndexSitemap : false , // We don't need index sitemap for a small site
6+ changefreq : 'monthly' ,
7+ priority : 0.7 ,
8+ sitemapSize : 5000 ,
9+ exclude : [
10+ '/api/*' ,
11+ '/server-sitemap-index.xml' ,
12+ '/404' ,
13+ '/500' ,
14+ '/_not-found' ,
15+ ] ,
16+ robotsTxtOptions : {
17+ policies : [
18+ {
19+ userAgent : '*' ,
20+ allow : '/' ,
21+ } ,
22+ ] ,
23+ additionalSitemaps : [
24+ // Add any additional sitemaps here if needed in the future
25+ ] ,
26+ } ,
27+ // Custom transform function to set specific priorities and change frequencies
28+ transform : async ( config , path ) => {
29+ // Set custom priority for specific pages
30+ let priority = config . priority ;
31+ let changefreq = config . changefreq ;
32+
33+ if ( path === '/' ) {
34+ priority = 1.0 ;
35+ changefreq = 'yearly' ;
36+ } else if ( path === '/enterprise' || path === '/evals' ) {
37+ priority = 0.8 ;
38+ changefreq = 'monthly' ;
39+ } else if ( path === '/privacy' || path === '/terms' ) {
40+ priority = 0.5 ;
41+ changefreq = 'yearly' ;
42+ }
43+
44+ return {
45+ loc : path ,
46+ changefreq,
47+ priority,
48+ lastmod : config . autoLastmod ? new Date ( ) . toISOString ( ) : undefined ,
49+ alternateRefs : config . alternateRefs ?? [ ] ,
50+ } ;
51+ } ,
52+ additionalPaths : async ( config ) => {
53+ // Add any additional paths that might not be automatically discovered
54+ // This is useful for dynamic routes or API-generated pages
55+ return [ ] ;
56+ } ,
57+ } ;
Original file line number Diff line number Diff line change 77 "check-types" : " tsc --noEmit" ,
88 "dev" : " next dev" ,
99 "build" : " next build" ,
10+ "postbuild" : " next-sitemap --config next-sitemap.config.cjs" ,
1011 "start" : " next start" ,
1112 "clean" : " rimraf .next .turbo"
1213 },
4243 "@types/react" : " ^18.3.23" ,
4344 "@types/react-dom" : " ^18.3.7" ,
4445 "autoprefixer" : " ^10.4.21" ,
46+ "next-sitemap" : " ^4.2.3" ,
4547 "postcss" : " ^8.5.4" ,
4648 "tailwindcss" : " ^3.4.17"
4749 }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 77 " src/activate/**" ,
88 " src/workers/countTokens.ts" ,
99 " src/extension.ts" ,
10- " scripts/**"
10+ " scripts/**" ,
11+ " apps/web-roo-code/next-sitemap.config.cjs"
1112 ],
1213 "workspaces" : {
1314 "src" : {
You can’t perform that action at this time.
0 commit comments