Using Nivel with Vike
Nivel exposes a Vike config helper so the consumer can keep a normal pages/+config.ts while delegating docs-specific integration to the engine.
JavaScript
import { createNivelVikeConfig } from '@unterberg/nivel/vike'
import docsConfig from './+docs'
const config = {
...createNivelVikeConfig(docsConfig),
prerender: true
}
export default configWhat the helper wires
- Vike React integration for docs rendering
- docs route generation expectations
- default title and description behavior
- prerender-friendly docs output
- global docs context consumed by the Nivel layout
The consumer still owns the visible shell files. See Project Shape for the complete shape.