Nitro Api
getSiteIndexable()
Last updated by
Harlan Wilton
in doc: explicit imports for nitro
Fixes #56. 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 '#site-config/server/composables'
const indexable = getSiteIndexable(e)
// true
Did this page help you?