Deploy to Cloudflare Pages (salesforcelwc.com)

Deploy to Cloudflare Pages (salesforcelwc.com)

This repo was originally published via GitHub Pages. To move www.salesforcelwc.com to Cloudflare Pages, follow the steps below.

1) Create the Cloudflare Pages project

  1. Cloudflare Dashboard → Workers & PagesPagesCreate a project
  2. Connect to GitHub and pick this repository (kishorekrrish/sfdc-website)
  3. Framework preset: Jekyll
  4. Build command: bundle exec jekyll build
  5. Build output directory: _site

Recommended environment variables (Project → Settings → Environment variables):

  • JEKYLL_ENV=production

2) Add the custom domain

Cloudflare Pages → your project → Custom domains:

  • Add www.salesforcelwc.com
  • (Optional) also add the apex salesforcelwc.com and set it to redirect to www

3) DNS cutover (Cloudflare DNS)

Make sure the domain’s DNS is managed in Cloudflare.

Then update DNS records:

  • www → CNAME to your Cloudflare Pages hostname (shown in Pages → Custom domains / DNS instructions)
  • (Optional) apex @ → follow Cloudflare’s recommended record for apex (varies by account/setup)

After DNS is active, Cloudflare will issue SSL automatically.

4) Turn off GitHub Pages (after Cloudflare is live)

In GitHub:

  1. Repo → SettingsPages
  2. Remove the custom domain and/or Unpublish site

This avoids having two hosts fighting over www.salesforcelwc.com.

Troubleshooting

  • If a Pages build fails with cannot load such file -- rexml/..., ensure the repo includes the rexml gem (already added in Gemfile).
  • If the build fails with many lines like Error: could not read file ...: no implicit conversion of Hash into Integer, it means Jekyll 3.8.x is being used on Ruby 3.x. Ensure Gemfile pins jekyll >= 3.9.2 (already done).
  • If assets look broken, double-check _config.yml has baseurl: / (it does).