We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2801b8a commit 0b67224Copy full SHA for 0b67224
src/runtime/nuxt/plugins/robot-meta.server.ts
@@ -1,6 +1,7 @@
1
import { defineNuxtPlugin } from 'nuxt/app'
2
import {
3
useRequestEvent,
4
+ useRuntimeConfig,
5
useServerHead,
6
} from '#imports'
7
@@ -11,12 +12,14 @@ export default defineNuxtPlugin({
11
12
// set from nitro, not available for internal routes
13
if (!ctx)
14
return
15
+ const config = useRuntimeConfig()
16
+
17
useServerHead({
18
meta: [
19
{
20
'name': 'robots',
21
'content': () => ctx.rule || '',
- 'data-hint': (import.meta.dev && !ctx.indexable) ? 'disabled in development' : undefined,
22
+ 'data-hint': () => config['nuxt-robots']?.debug ? ctx.debug?.source : undefined,
23
},
24
],
25
})
0 commit comments