Docs Build & Deploy

Build & Deploy

Build static HTML pages locally and deploy them to your existing site. On-domain paths, your pipeline, zero DNS configuration.

How It Works

Contento generates static HTML files locally into an output directory. You deploy those files to your existing site using whatever deploy pipeline you already have. Pages live at on-domain paths like example.com/articles/topic-slug — no subdomains, no CNAME records, no third-party hosting.

  1. Run contento build to generate HTML pages into a local output directory
  2. Each page is wrapped in your chrome templates (header, footer, CSS) from contento.yaml
  3. A sitemap and internal links are generated automatically
  4. Deploy the output directory to your site using your existing workflow

Building Pages

The contento build command reads your project configuration from contento.yaml, pulls generated content, wraps each page in your chrome templates, and writes static HTML files to the output directory.

$ contento build --output ./dist/articles

  Building pages...
  ✓ 248 pages built
  ✓ Sitemap generated (sitemap.xml)
  ✓ Internal links added (avg 4.2 links per page)
  Output: ./dist/articles/

The build reads your chrome templates from contento.yaml and wraps each page with your site's header, footer, and styles. The result is plain HTML that matches your existing site design.

Tip: Run contento build in your CI pipeline to keep pages up to date automatically whenever you push changes to your chrome templates or generate new content.

Output Structure

The build command produces a flat directory of HTML files and a sitemap:

dist/articles/
├── 100-api-testing-ideas-2026.html
├── best-cicd-tools-comparison.html
├── devops-checklist-2026.html
├── sitemap.xml
└── ...

Each HTML file is a self-contained page ready to serve. The sitemap includes all generated pages with their canonical URLs based on your domain configuration.

Deploying

Deploy the output directory using whatever method your site already uses. Here are examples for common platforms:

Astro (Recommended Host)

If you're starting a new pSEO project, we recommend hosting Contento's output inside an Astro site. Astro produces static HTML, ships zero JavaScript by default, and treats Contento's output as just another set of files to serve. Generate Contento pages directly into Astro's public/ directory and Astro picks them up at the next build:

# Build Contento pages straight into Astro's public/articles/
$ contento build --output ./public/articles

# Then build & deploy Astro normally
$ npm run build
$ npm run deploy # or netlify/vercel/cloudflare deploy commands

Why Astro pairs cleanly with Contento: same deploy targets (Netlify, Vercel, Cloudflare Pages, S3, GitHub Pages), Astro layouts can be exported as Contento chrome (contento projects chrome --header ./dist/_chrome/header.html), and Astro's public/ directory serves on-domain at the path you choose. See Install → Set Up an Astro Site for the full scaffold.

Netlify

$ netlify deploy --prod --dir=./dist

Rsync to a Server

$ rsync -avz ./dist/articles/ user@server:/var/www/example.com/articles/

Git-Based Deploys (GitHub Pages, Vercel, etc.)

$ git add dist/ && git commit -m "Add pSEO pages" && git push

AWS S3

$ aws s3 sync ./dist/articles/ s3://my-bucket/articles/
Automate it: Add contento build and your deploy command to a CI/CD pipeline (GitHub Actions, GitLab CI, etc.) so pages are rebuilt and deployed automatically on every push or on a schedule.

On-Domain Paths

Contento generates pages that live at paths on your own domain — for example, example.com/articles/100-api-testing-ideas-2026. This is a deliberate design choice over the subdomain approach (articles.example.com).

Why on-domain paths matter:

  • Domain authority: Pages on your root domain inherit and contribute to your existing domain authority, rather than starting from zero on a new subdomain
  • Natural integration: On-domain paths look and feel like a natural part of your site to both visitors and search engines
  • No subdomain penalty signal: Search engines can treat subdomains as separate sites, diluting ranking signals. On-domain paths avoid this entirely
  • Zero DNS configuration: No CNAME records, no DNS propagation delays, no SSL certificates to manage. Deploy files and they are live
Important: Make sure your web server or hosting platform is configured to serve HTML files from the output path. For example, if you deploy to /articles/, requests to example.com/articles/devops-checklist-2026 should serve devops-checklist-2026.html from that directory.

Integrating with Your Site

Once your pages are deployed, connect them to the rest of your site:

  • Navigation: Add a link to your articles section (e.g., /articles/) in your site's main navigation or footer
  • Chrome templates: Make sure your chrome templates in contento.yaml match your existing site's header, footer, and CSS so that generated pages are visually consistent
  • Internal links: Contento automatically adds internal links between generated pages. You can also link to these pages from your existing blog posts, documentation, or landing pages to strengthen their authority

See Chrome Templates for details on configuring your site's header, footer, and styles.