Deploying on Netlify

Netlify works seamlessly with BCMS. There’s no special configuration required - just set your environment variables properly.

Set environment variables

In your Netlify project dashboard, add the following environment variable:

  • BCMS_API_KEY

These should match what you use in local development.


Reference them in code

Use the environment variables when initializing the BCMS client:

import { Client } from '@thebcms/client';

export const bcms = new Client({
    apiKey: process.env.BCMS_API_KEY,
    injectSvg: true,
});

Trigger builds on content updates

For static builds, you can connect a webhook in BCMS to trigger Netlify deploys when content is published or updated.