Robots
Nitro Api

getSiteIndexable()

See if the Site is indexable within Nitro.

Type: () => { indexable: boolean; hints: string[] }

Get the robots config for the entire site.

This is useful for determining if the user has explicitly opted out of indexing the site or they have a hosted non-production site.

Usage

import { getSiteIndexable } from '#imports'

const { indexable, hints } = getSiteIndexable()