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
- Cloudflare Dashboard → Workers & Pages → Pages → Create a project
- Connect to GitHub and pick this repository (
kishorekrrish/sfdc-website) - Framework preset:
Jekyll - Build command:
bundle exec jekyll build - 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.comand set it to redirect towww
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:
- Repo → Settings → Pages
- 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 therexmlgem (already added inGemfile). - 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. EnsureGemfilepinsjekyll >= 3.9.2(already done). - If assets look broken, double-check
_config.ymlhasbaseurl: /(it does).
Never miss a
story from us, subscribe to our newsletter