Nitro Api

getSiteIndexable()

Last updated by
Harlan Wilton
in doc: sync with nuxt-seo.

Determine if the site is indexable by search engines.

This will use the env, if it is production then it will return true, otherwise it will return false.

It can be overridden by providing a indexable property in the site config. This allows you to opt-out of indexing in production.

Usage

import { getSiteIndexable } from '#imports'

const indexable = getSiteIndexable(e)
// true
Did this page help you?