Indexing
How Peam discovers, filters, and indexes content
Overview
Indexing is the build-time pipeline that turns your content into searchable artifacts. Most teams configure it via withPeam (Next.js) or the Peam CLI. The builder and indexers are managed for you.
Next.js 14 or older
Automatic prerender discovery only works on Next.js 15+. For Next.js 14 (or older), add a postbuild script that
runs peam to discover pages after next build. See the Next.js getting started
guide.
Quick start (Next.js)
// next.config.ts
import withPeam from '@peam-ai/next';
export default withPeam({
exclude: ['/admin/**', '/private/**'],
robotsTxt: true,
})();Quick start (CLI)
peam \
--source fileBased --projectDir . --sourceDir .next \
--exclude /admin/** \
--store fileBased --indexPath .peam/index.jsonHow indexing runs
At build time, Peam discovers pages via index sources, applies filters, then uses the indexing pipeline to produce artifacts that are exported to your configured store.