No follow for non-production env
This commit is contained in:
parent
ea7041be28
commit
b29cdf8d8a
|
@ -44,10 +44,14 @@ export default {
|
|||
components: {},
|
||||
|
||||
setup() {
|
||||
const config = useRuntimeConfig()
|
||||
useOpnSeoMeta({
|
||||
title: 'OpnForm',
|
||||
description: 'Create beautiful forms for free. Unlimited fields, unlimited submissions. It\'s free and it takes less than 1 minute to create your first form.',
|
||||
ogImage: '/img/social-preview.jpg',
|
||||
robots: () => {
|
||||
return config.public.env === 'production' ? null : 'noindex, nofollow'
|
||||
}
|
||||
})
|
||||
useHead({
|
||||
titleTemplate: (titleChunk) => {
|
||||
|
|
|
@ -132,7 +132,7 @@ useOpnSeoMeta({
|
|||
}
|
||||
return (form && form.value.cover_picture) ? form.value.cover_picture : null
|
||||
},
|
||||
robots () {
|
||||
robots: () => {
|
||||
return (form && form.value.can_be_indexed) ? null : 'noindex, nofollow'
|
||||
}
|
||||
})
|
||||
|
|
|
@ -275,7 +275,7 @@ useOpnSeoMeta({
|
|||
if (!template || !template.value) return null
|
||||
return template.value.image_url
|
||||
},
|
||||
robots() {
|
||||
robots: () => {
|
||||
if (!template || !template.value) return null
|
||||
return template.value.publicly_listed ? null : 'noindex'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue