Usage
This documentation covers the standalone Builder.io integration and does not describe all the capabilities the Alokai ↔ Builder.io setup offers. If your project is using Alokai Builder.io Module, we recommend visiting its documentation instead - it provides information on unified data structure, ready-made components, and a more streamlined developer experience.
Alokai integration for Builder.io ships with a framework-agnostic Typescript SDK. You can use it to fetch your data from the Content API.
Before you read
Visit Alokai SDK documentation to learn how to access sdk in both Next and Nuxt.
Fetching content
Our SDK gives you access to all data-fetching methods provided by @builder.io/sdk.
const content = await sdk.builderio.get('page', {
url: '/',
locale: 'en'
});
const content = await sdk.builderio.getAll('page', {
url: '/',
locale: 'en',
limit: 1
});
Initializing Live Preview
The Live Preview feature is handled out-of-the-box by Builder's