Snowlake Jekyll documentation

Deploy to Cloudflare Pages

Publish Snowlake on Cloudflare Pages from a GitHub or GitLab repository: build settings, environment variables, custom domain and fixes for common build errors.

Overview

Cloudflare Pages builds Snowlake straight from your Git repository and republishes it every time you push. It is free for most sites, and the repository can be private.

All build settings live in the Cloudflare dashboard, so the theme needs no Cloudflare config file. If you have a cloudflare.toml from Snowlake 2.0 or older, you can delete it: Cloudflare Pages never reads it.

Before you start

  1. Set your site address in _config.yml:
    baseurl: ""
    url: "https://your-domain.com"
    Use your own domain, or the *.pages.dev address Cloudflare gives you after the first deploy. Leave baseurl empty: Cloudflare serves the site from the root of the domain.
  2. Push the theme to a GitHub or GitLab repository. Include the Gemfile; Gemfile.lock is optional.

Create the project

  1. In the Cloudflare dashboard, open Workers & Pages and choose Create.
  2. Choose Pages, then connect your GitHub or GitLab account and select your repository.
  3. Enter these build settings:
Setting Value
Production branch main
Framework preset Jekyll
Build command bundle exec jekyll build
Build output directory _site
  1. Under Environment variables, add:
Variable Value Why
JEKYLL_ENV production Turns on production output, such as the Google Analytics tag
RUBY_VERSION 3.4.4 Optional. Pins the Ruby version Snowlake was tested with, so a future Cloudflare default can’t change it
  1. Choose Save and Deploy. Cloudflare installs the gems from your Gemfile automatically, builds the site and gives you a *.pages.dev address. The first build takes a few minutes; later builds are faster.

Add your domain

Open your project, go to Custom domains and add your domain. If you change the address, update url in _config.yml to match and push again, so share links and preview images use the right address.

Preview deployments

Every branch you push gets its own preview address. To include draft and future-dated posts in previews only, set a different build command for the Preview environment:

bundle exec jekyll build --drafts --future

Troubleshooting

cannot load such file -- csv or wdm fails to install. Your Gemfile is from Snowlake 1.1 or older, which predates Ruby 3.4. Copy the Gemfile from the latest Snowlake download and push again.

Pages have no styles or images. Check that baseurl in _config.yml is empty ("").

Share links point to the demo site. Set url in _config.yml to your own domain.

Google Analytics shows no visits. Check that JEKYLL_ENV is set to production and that google_analytics.enable is true in _data/general_settings.yml.