Back to Blog

Local setup for the shadcn + Marble CMS blog template

General

Follow these steps to get the template running locally and connected to your Marble CMS workspace.

1) Clone and install dependencies

git clone https://github.com/your-org/shadcn-marble-cms-blog-template.git

cd shadcn-marble-cms-blog-template

# with bun
bun install

# or with npm
npm install

2) Create a Marble workspace and get your Workspace Key

- Go to the Marble CMS dashboard https://marblecms.com)

- Log in or create an account

- Create (or open) your workspace

- Open Workspace Settings → copy your Workspace Key

3) Add environment variables

Create a .env.local file at the project root with:

MARBLE_API_URL=https://api.marblecms.com/v1
MARBLE_WORKSPACE_KEY=YOUR_WORKSPACE_KEY

Note: Never expose MARBLE_WORKSPACE_KEY in client-side code.

4) Run the app

# dev
bun run dev

# build & start
bun run build && bun run start

Open http://localhost:3000.

5) Write posts in Marble

- In the Marble dashboard, create posts in your workspace

- The blog list and post pages will fetch content from Marble and display it on the site

That’s it. Create content in the CMS and it will appear on your site.