Docs First Project

First Project

Create a project, select niches, generate pages, and publish — end to end.

Prerequisite: Make sure the CLI is installed. See Install CLI if you have not set it up yet.

Step 1: Configure Your AI Provider

Contento has no login or central account. The CLI calls your AI provider directly using your own key. If you haven't set one yet, run contento config set to pick a provider, model, and paste your API key — or set the provider env var (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.) and skip the prompt entirely.

contento config show

  Provider:  openai
  Model:     gpt-4o-mini
  API Key:   sk-proj-A...xkN9
  Enabled:   yes

Step 2: Create a Project

A project ties together your domain, chrome templates, output path, and any per-project overrides. Initialize one with contento init in any directory — it writes a contento.config.json you can commit to git:

contento init \
    --name "DevTools Resources"

  ✓ Project created
  Project "DevTools Resources" created with ID: proj_8f3a...

  ID       proj_8f3a...
  Name     DevTools Resources
  Domain   example.com
  Status   active

This writes contento.config.json in the working directory and returns a project ID you'll use for every later command.

Step 3: Browse Niches

Contento ships with 150+ niches. Browse them to find your target audience:

contento niches list --category "Software / SaaS"

  Slug                  Name                  Category          Subtopics
  ───────────────────────────────────────────────────────────────────────
  developer-tools       Developer Tools       Software / SaaS   20
  project-management    Project Management    Software / SaaS   20
  crm                   CRM                   Software / SaaS   20
  ... 17 more

Note the niche slugs — you will use them when creating a collection. Use --json for machine-readable output.

Step 4: Choose a Schema

Pick a content type for your first batch. The idea-list schema is a good starting point:

contento schemas list

  Slug             Title Pattern
  ──────────────────────────────────────────────
  idea-list        {count} {subtopic} Ideas for {year}
  checklist        The Ultimate {subtopic} Checklist
  comparison       {A} vs {B}: Which Is Better?
  ... 7 more

Step 5: Generate Pages

Start a generation job that combines your project, selected niches, and schema:

# First, create a collection
contento collections create \
    --project proj_8f3a... \
    --schema "idea-list" \
    --niches "niche_01...,niche_02..."

  ✓ Collection created
  Collection created with ID: col_9d2f...

# Then, generate content
contento collections generate col_9d2f...

  ✓ Generation started (Job: job_4a1b...)

  [00:04] ██▁▁▁▁▁▁▁▁▁▁▁▁▁▁  5/38  (13%)
  [00:12] ███████▁▁▁▁▁▁▁▁▁ 20/38  (53%)
  [00:20] ████████████████ 38/38 (100%)

  ✓ Generation complete!

The engine expands subtopics from each niche, deduplicates titles, generates JSON content via AI, validates against the schema, and retries failures automatically.

Step 6: Build & Deploy

Once generation completes, build the static HTML output:

contento build proj_8f3a... --output ./dist/articles

  ✓ Built 36 pages to ./dist/articles/
  HTML files:  36
  Sitemap:     ./dist/articles/sitemap.xml

  Deploy with your existing pipeline: git push, netlify deploy, rsync, etc.

Then deploy the output to your existing static site using whatever method you prefer:

# Astro (recommended host) — output goes into public/articles, built with the rest
contento build --output ./public/articles
npm run build && npm run deploy

# Netlify
netlify deploy --prod

# Or rsync to your server
rsync -avz ./dist/articles/ user@server:/var/www/example.com/articles/

# Or commit and push (e.g. GitHub Pages)
git add dist/ && git commit -m "Add generated articles" && git push
New project? We recommend pairing Contento with Astro as the host site. Astro produces static HTML, deploys to all the same targets, and Contento's output drops into Astro's public/ directory with zero config. See Install → Set Up an Astro Site for the scaffold.

Your pages are now live on your own domain at on-domain paths:

  • https://example.com/articles/100-api-testing-ideas-2026
  • https://example.com/articles/100-cicd-pipeline-ideas-2026
  • https://example.com/articles/sitemap.xml

What Happened Behind the Scenes

During the generate and build steps, Contento:

  1. Expanded subtopics — Pulled 10–20 subtopics from each selected niche
  2. Deduplicated — Removed overlapping subtopics across niches
  3. Built prompts — Combined niche context + schema template + validation rules
  4. Generated JSON — Sent prompts to AI provider with concurrent workers
  5. Validated — Checked item counts, string lengths, enum values, required fields
  6. Retried failures — Adjusted prompt and retried once for failed pages
  7. Rendered HTML — Transformed validated JSON through the schema's renderer
  8. Applied chrome — Wrapped each page in your header/footer/CSS
  9. Cross-linked — Added internal links between related pages in the same niche
  10. Built sitemap — Generated sitemap.xml with all page URLs

Next Steps

  • Generation Pipeline — Understand concurrent workers, prompt building, and retry logic
  • Publishing — Learn the four publish modes and batch control
  • Custom Chrome — Upload your header, footer, and CSS
  • Analytics — Connect Google Search Console to track performance