Skip to content

Conversation

@harlan-zw
Copy link
Collaborator

@harlan-zw harlan-zw commented Nov 24, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

⚠️ Breaking Changes

Removed inferStaticPagesAsRoutes config

If you set this value to false previously, you will need to change it to the below:

export default defineNuxtConfig({
	sitemap: {
-    	inferStaticPagesAsRoutes: false,
+    	excludeAppSources: ['pages', 'route-rules', 'prerender']
	}
})

Removed dynamicUrlsApiEndpoint config

The sources config supports multiple API endpoints and allows you to provide custom fetch options, use this instead.

export default defineNuxtConfig({
	sitemap: {
-    	dynamicUrlsApiEndpoint: '/__sitemap/urls',
+    	sources: ['/__sitemap/urls']
	}
})

Removed cacheTtl config

Please use the cacheMaxAgeSeconds as its a clearer config.

export default defineNuxtConfig({
	sitemap: {
-    	cacheTtl: 10000,
+    	cacheMaxAgeSeconds: 10000
	}
})

Removed index route rule / Nuxt Content support

If you were using the index: false in either route rules or your Nuxt Content markdown files, you will need to update this to use the robots key.

export default defineNuxtConfig({
  routeRules: {
    // use the `index` shortcut for simple rules
-    '/secret/**': { index: false },
+    '/secret/**': { robots: false },
  }
})

@vercel
Copy link

vercel bot commented Nov 24, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
sitemap-edge-demo βœ… Ready (Inspect) Visit Preview Nov 24, 2024 4:33pm

@harlan-zw harlan-zw merged commit eb8c8c2 into main Nov 24, 2024
1 check passed
@harlan-zw harlan-zw deleted the fix/remove-deprecations branch November 24, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants