Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: drop all deprecations #167

Merged
merged 1 commit into from
Nov 24, 2024
Merged

fix!: drop all deprecations #167

merged 1 commit into from
Nov 24, 2024

Conversation

harlan-zw
Copy link
Contributor

@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 rules config

The v4 of Nuxt Robots provided a backward compatibility rules config. As it was deprecated, this is no longer supported. If you're using rules, you should migrate to the groups config or use a robots.txt file.

export default defineNuxtConfig({
	robots: {
-    	rules: {},
+    	groups: {}
	}
})

Removed defineRobotMeta composable

This composable didn't do anything in v4 as the robots meta tag is enabled by default. If you'd like to control the robot meta tag rule, use the useRobotsRule() composable.

- defineRobotMeta(true)
+ useRobotsRule(true)

Removed RobotMeta component

This component was a simple wrapper for defineRobotMeta, you should use useRobotsRule() if you wish to control the robots rule.

Removed index, indexable config

When configuring robots using route rules or Nuxt Content you could control the robot's behavior by providing index or indexable rules.

These are no longer supported and you should use robots key.

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

@harlan-zw harlan-zw merged commit f499cb4 into main Nov 24, 2024
1 check passed
@harlan-zw harlan-zw deleted the fix/drop-deprecations branch November 24, 2024 13:36
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.

1 participant