Skip to content

Site: move to dz-delivery.younes-sarni.com (Cloudflare Pages) - #8

Merged
developing-off merged 4 commits into
mainfrom
seo/cloudflare-pages
Nov 6, 2026
Merged

developing-off merged 4 commits into
mainfrom
seo/cloudflare-pages

Conversation

@developing-off

@developing-off developing-off commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Part of #7 (domain and hosting section, plus quick fixes).

Changes

  • scripts/build-site.sh: builds _site/ with only the public site (home page, carrier folders, assets/, _headers). It also generates robots.txt and sitemap.xml, with lastmod taken from each page's last commit. The static sitemap.xml is removed.
  • _headers: X-Robots-Tag: noindex on *.pages.dev (production alias and previews), so only the custom domain gets indexed.
  • URLs: canonical, og:url, og:image, JSON-LD, sitemap, READMEs and homepage in package.json and composer.json now point to https://dz-delivery.younes-sarni.com/.
  • Home page <title> shortened to about 55 characters.
  • CI: new site job that builds the site and fails if developing-off.github.io is still in the output.

Before merging

  1. Cloudflare Pages: connect the repo, branch main, build command sh scripts/build-site.sh, output directory _site.
  2. Add dz-delivery.younes-sarni.com as a custom domain on the Pages project.
  3. Check that https://dz-delivery.younes-sarni.com/ loads (a preview of this PR works too).

Do not merge before the domain is live, or the canonicals will point to a page that does not exist.

After merging

  • Search Console: add the new property and submit https://dz-delivery.younes-sarni.com/sitemap.xml.
  • gh repo edit --homepage https://dz-delivery.younes-sarni.com/
  • GitHub Pages: leave it on for now (its canonicals already point to the new domain), and turn it off once Google has indexed the new URLs.
  • homepage on npm and Packagist updates with the next release.

🤖 Generated with Claude Code


Summary by cubic

Moves the public site from GitHub Pages to Cloudflare Pages on the custom domain dz-delivery.younes-sarni.com, and re-points every canonical, Open Graph, JSON-LD, README and package-homepage URL at the new domain. This covers the domain-and-hosting part of #7.

Only the custom domain gets indexed: a _headers rule returns X-Robots-Tag: noindex on all *.pages.dev deployments and previews. scripts/build-site.sh assembles _site/ and generates robots.txt and sitemap.xml with lastmod dates taken from git history; the static sitemap.xml is removed. A new 404.html makes unknown URLs return 404 instead of the home page, and SITE_URL is validated as an origin at build time. Finally, the home page <title> is shortened, and CI now builds the site and fails if the old GitHub Pages URL still appears in the output.

Rollout

  • Set up the Cloudflare Pages project on branch main with build command sh scripts/build-site.sh and output directory _site, then add the custom domain before merging — merging early makes the canonicals point at a page that does not exist.
  • After the domain is live, submit https://dz-delivery.younes-sarni.com/sitemap.xml to Search Console and update the repository homepage.

Written for commit feb4787. Summary will update on new commits.

View guided diff Turn on auto-fix

- scripts/build-site.sh builds _site/ with only the public site files,
  plus robots.txt and a sitemap.xml whose lastmod dates come from git.
- _headers keeps *.pages.dev deployments out of search engines.
- Canonical, Open Graph, JSON-LD, README and package homepage URLs now
  point to https://dz-delivery.younes-sarni.com/.
- Shorter home page <title>.
- CI builds the site and fails if the old GitHub Pages URL remains.

Refs #7

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 19 files

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread scripts/build-site.sh Resolved
Comment thread .github/workflows/ci.yml Resolved
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Deploying dz-delivery with  Cloudflare Pages  Cloudflare Pages

Latest commit: feb4787
Status: ✅  Deploy successful!
Preview URL: https://0decfa69.dz-delivery.pages.dev
Branch Preview URL: https://seo-cloudflare-pages.dz-delivery.pages.dev

View logs

@developing-off
developing-off merged commit b4bb34c into main Nov 6, 2026
9 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.

1 participant