Skip to content

docs: rebuild documentation site (SEO, quick starts, Cloudflare preview) - #163

Merged
chihab merged 5 commits into
mainfrom
claude/dotenv-run-docs-site-rtke5g
Aug 20, 2026
Merged

chihab merged 5 commits into
mainfrom
claude/dotenv-run-docs-site-rtke5g

Conversation

@chihab

@chihab chihab commented Aug 14, 2026

Copy link
Copy Markdown
Owner

What & why

The docs site was rendering without styles. Root cause: the site was serving from a subpath while assets were referenced from the domain root, and the dotenv.run custom domain (which is no longer owned) meant every deploy dropped the domain and all /_astro/* assets 404'd. This rebuilds the site, fixes the hosting, and makes it easy to preview.

Changes

Fix the broken styles

  • Remove the stale root CNAME (dotenv.run is no longer owned).
  • Target Cloudflare Pages at the domain root so absolute /_astro/* asset paths resolve correctly.

Simpler, clearer content

  • Sidebar reorganized into Getting Started / Popular / Bundlers / Guides.
  • Removed empty/thin pages that diluted the site (and SEO).
  • Prominent quick starts for the three most-used packages:
    • Angular · @ngx-env/builder — new dedicated, SEO-focused page.
    • CLI · @dotenv-run/cli
    • Core · @dotenv-run/core
  • Landing page + a tabbed Quick Start page covering all three.
  • Monorepo (Nx / Turborepo) usage highlighted throughout.

SEO

  • Per-page titles and meta descriptions, keywords, Open Graph tags, canonical URLs, sitemap and robots.txt.
  • Angular and monorepo pages written to rank for "Angular environment variables", "ngx-env", ".env monorepo", etc.

Preview on the PR (Cloudflare Pages)

  • Replaces the old GitHub Pages workflow with .github/workflows/docs.yml, which deploys production on main and posts a preview URL comment on every PR.

One-time setup to enable previews

The workflow safely no-ops until these exist (so it won't fail PR checks):

  1. Create a Cloudflare Pages project named dotenv-run:
    npx wrangler pages project create dotenv-run --production-branch main
  2. Add two repository secrets: CLOUDFLARE_API_TOKEN (Pages: Edit) and CLOUDFLARE_ACCOUNT_ID.

Full instructions are in docs/README.md. Once set up, this PR will get a preview link automatically.

Verification

Built locally (pnpm --filter @dotenv-run/docs build, 16 pages) and rendered the homepage, Quick Start and Angular pages with a headless browser — styles, sidebar, tabs and code blocks all render correctly.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 4 commits August 14, 2026 10:04
- Fix broken styles: remove stale dotenv.run CNAME and target Cloudflare
  Pages at the domain root (absolute /_astro asset paths now resolve)
- Simplify the site: reorganize sidebar into Getting Started / Popular /
  Bundlers / Guides and drop empty/thin pages
- Add prominent quick starts for @ngx-env/builder (Angular), @dotenv-run/cli
  and @dotenv-run/core on the landing and Quick Start pages
- Add a dedicated, SEO-focused Angular (@ngx-env/builder) page and emphasize
  monorepo (Nx/Turborepo) usage
- SEO: per-page titles/descriptions, keywords, Open Graph tags, canonical
  URLs, sitemap and robots.txt
- Replace the GitHub Pages workflow with a Cloudflare Pages workflow that
  deploys production on main and posts a preview URL on each PR

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9Pkjv6hPMrpxE94tkRQhc
Re-run the docs workflow now that CLOUDFLARE_API_TOKEN and
CLOUDFLARE_ACCOUNT_ID are configured, so the PR gets a preview deployment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9Pkjv6hPMrpxE94tkRQhc
cloudflare/wrangler-action runs `pnpm add wrangler` at the workspace root,
which pnpm rejects on this monorepo (ERR_PNPM_ADDING_TO_ROOT). Invoke
wrangler through npx in isolation and parse the preview URL from its output.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9Pkjv6hPMrpxE94tkRQhc
Fresh run so the Cloudflare deploy is exercised with the npx-based workflow
(head), rather than re-running stale pre-fix runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9Pkjv6hPMrpxE94tkRQhc
@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

📚 Docs preview

Your changes to the documentation site are deployed:

Preview URL https://claude-dotenv-run-docs-site.dotenv-run.pages.dev
Commit 1a5db5e56df11f5c283ef64aa8b01f951bce536e

This comment updates automatically on every push to the PR.

Drop the Starlight header logo and the landing-page hero image so the site
uses the plain wordmark.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9Pkjv6hPMrpxE94tkRQhc
@chihab
chihab merged commit 638fb7a into main Aug 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants