Skip to Content
OperationsPublishing the docs

Cloudflare Pages

This docs site is already configured for static export:

  • next.config.mjs sets output: 'export'
  • npm run build writes the site to out/
  • npm run postbuild generates llms.txt, raw markdown, and sitemap.xml

That makes Cloudflare Pages a good fit for docs.hiveloom.cloud.

Cloudflare’s current Next.js static export guide uses:

  • framework preset: Next.js (Static HTML Export)
  • build command: npx next build
  • build output directory: out

For this repo, use the repo-local commands instead:

cd hiveloom-cloud/docs/nextra npm ci npm run build npm run postbuild npm run check-links

One-time setup in Cloudflare

  1. Push the docs source to the Git repo you want Cloudflare Pages to watch.
  2. In Cloudflare, open Workers & Pages and create a new Pages project.
  3. Choose Import an existing Git repository.
  4. Select the repo and branch you want to deploy from, usually main.
  5. Set these build settings:
Framework preset: Next.js (Static HTML Export) Root directory: hiveloom-cloud/docs/nextra Build command: npm ci && npm run build && npm run postbuild Build output directory: out Node.js version: 20
  1. Create the project and let the first build finish.
  2. In the Pages project, open Custom domains and add docs.hiveloom.cloud.
  3. If the DNS zone is already in the same Cloudflare account, Cloudflare can create the DNS record for you.

Pre-deploy checklist

Run this locally before pushing:

cd /root/github/hiveloom-app/hiveloom-cloud/docs/nextra npm ci npm run build npm run postbuild npm run check-links

That verifies:

  • the static export succeeds
  • llms.txt and the raw markdown artifacts are regenerated
  • internal links still resolve

What gets published

The built out/ directory contains:

  • HTML pages
  • static assets from public/
  • llms.txt
  • llms-full.txt
  • one .md file per page
  • sitemap.xml

Optional: direct upload

If you do not want Git integration, Cloudflare Pages also supports direct upload of a prebuilt static directory. In that mode:

  1. Build the site locally.
  2. Use the generated out/ directory as the upload artifact.
  3. Create the Pages project as a direct-upload project.

Git integration is usually better for this repo because every push produces a repeatable deployment and preview URLs.

Exact settings for this repo

Copy these values as-is:

Project name: hiveloom-docs Production branch: main Framework preset: Next.js (Static HTML Export) Root directory: hiveloom-cloud/docs/nextra Build command: npm ci && npm run build && npm run postbuild Build output directory: out Environment variable: NODE_VERSION=20 Custom domain: docs.hiveloom.cloud

After the first deploy

Smoke test the live site:

curl -I https://docs.hiveloom.cloud/ curl -I https://docs.hiveloom.cloud/llms.txt curl -I https://docs.hiveloom.cloud/install.md

If those return 200, the static site is live and the AI-readable artifacts are published too.