EarlySEO LogoEarlySEO Docs

SDK

Publish EarlySEO articles to CDN and render them on your website with @earlyseo/blog.

Open .mdx

The SDK integration is the best option when you want to display EarlySEO articles on a custom frontend (Next.js, React, or any headless setup).

When you publish an article in EarlySEO, we write JSON files to CDN:

  • https://media.earlyseo.com/site/{siteId}/manifest.json
  • https://media.earlyseo.com/site/{siteId}/articles/page-1.json
  • https://media.earlyseo.com/site/{siteId}/article/{slug}.json

Your frontend reads these files using @earlyseo/blog.

When to use SDK

Use SDK when:

  • You want full control over design and routing
  • You use Next.js App Router or custom React frontends
  • You do not want direct CMS publishing

Do not use SDK when:

  • You want direct publishing into WordPress/Webflow/Shopify admin
  • Your team relies on CMS-native editorial workflows only

Setup

1. Create integration in EarlySEO

  1. Open EarlySEO Dashboard -> Integrations
  2. Click Add Integration
  3. Choose SDK (@earlyseo/blog)
  4. Set publish mode to Publish (recommended)
  5. Save integration

2. Copy your Site ID

After creating SDK integration, copy the Site ID from your site settings or integration panel.

3. Install SDK package

JavaScript / TypeScript:

npm install @earlyseo/blog

Python:

pip install earlyseo-blog

4. Add env variable

EARLYSEO_SITE_ID=your-site-id

Automatic setup (optional)

Skip manual steps 3–5 with the CLI scaffolds:

# Next.js — creates blog pages and .env.local
npx @earlyseo/blog init

# Django / Flask — detects framework, generates templates and .env
earlyseo-blog

5. Implement frontend pages

JavaScript / TypeScript:

Python:

Verify setup

  1. Publish one article from EarlySEO dashboard
  2. Open your frontend /blog
  3. Confirm article list appears
  4. Open one article URL and verify content renders correctly

Troubleshooting

For a full checklist, see SDK Troubleshooting.

No articles showing

  • Confirm EARLYSEO_SITE_ID is correct
  • Confirm article was published (not draft)
  • Confirm SDK integration exists and is active

404 on article page

  • Check slug in URL matches published article slug
  • Republish article once to refresh CDN files

Styles look off

  • Use default styled mode first
  • Then apply custom theming from Article Theming

On this page