Spica Jekyll documentation
Publishing
Publish Spica for free on GitHub Pages, Cloudflare or Netlify, with your own domain.
bundle exec jekyll build turns your project into a folder of plain files, _site/, that any web host can serve. The easiest way to publish is to put your project on GitHub and connect it to a free host, which rebuilds the site every time you save a change.
Set url in _config.yml to your final address first.
Settings for every host
| Setting | Value |
|---|---|
| Build command | bundle exec jekyll build |
| Output folder | _site |
| Ruby version | A Ruby 3 version, such as 3.3 or 3.4 (set RUBY_VERSION if the host asks). Not 4.0. |
The Gemfile uses the github-pages gem, which pins the same versions GitHub Pages uses, so builds match what you see on your computer.
GitHub Pages
- Put the project in a GitHub repository, so that
_config.ymlsits at the top level of it. GitHub Desktop makes this point-and-click. - In
_config.yml, set the address (see “Address” below). - In the repository, open Settings → Pages. Under Build and deployment, choose Deploy from a branch, then your branch (usually
main) and/ (root), and click Save. - Wait a minute or two. The address appears at the top of the Pages settings.
GitHub Pages builds the site with its own Jekyll. Spica only uses plugins on GitHub’s list (jekyll-seo-tag, jekyll-sitemap, jekyll-feed and jekyll-paginate) and plain CSS, so it needs no GitHub Actions. _config.yml already sets theme: null, so GitHub doesn’t add a default theme of its own. Keep that line.
Address. A personal site at your-username.github.io uses:
url: "https://your-username.github.io"
baseurl: ""
A project site at your-username.github.io/blog needs baseurl: "/blog", and url stays https://your-username.github.io.
Your own domain
- In your repository, open Settings → Pages → Custom domain, enter your domain (
www.example.comorexample.com) and save. - At your domain provider, add the DNS record GitHub asks for:
- For
www.example.com, or any subdomain: a CNAME record pointing toyour-username.github.io. - For
example.comitself: A records pointing to GitHub’s addresses, listed in GitHub’s guide.
- For
- When the check passes, tick Enforce HTTPS.
- Set
urlin_config.ymlto the new address, and keepbaseurl: "".
Cloudflare
Cloudflare is free, fast worldwide, and has no bandwidth limits.
- Put the project in a GitHub repository.
- Open
wrangler.jsonc. Change"name"to your project’s name if you like. - In the Cloudflare dashboard, go to Workers & Pages → Create and import the repository.
- Cloudflare creates new projects as Workers. Spica includes a
wrangler.jsoncfile that tells it to serve the_sitefolder as a static site, so keep the suggested deploy command (npx wrangler deploy) and set the build command tobundle exec jekyll build. - Click Deploy. When it finishes, add your domain under Settings → Domains & Routes.
What wrangler.jsonc does:
- Serves the
_sitefolder. - Sends unknown addresses to your
404.htmlwith a real 404 status. - Makes
/blogand/blog/both work.
If you choose a classic Cloudflare Pages project instead, use the settings in the table above. wrangler.jsonc is then ignored. _config.yml keeps wrangler.jsonc out of the built site.
Netlify
- Put the project in a GitHub repository.
- In Netlify, choose Add new site → Import an existing project and pick the repository.
- Use the build command and output folder from the table above. Netlify reads the
Gemfile. You don’t needwrangler.jsonc. - Deploy, then add your domain under Domain management.
If you want the contact form to use Netlify, set spica.contact.provider to netlify. See Newsletter and contact form.
Any other web host
Build on your computer with bundle exec jekyll build and upload the contents of the _site folder.
After you publish
- Check that both forms are out of demo mode, and send yourself a test message. See Newsletter and contact form.
- If you use comments, check that “Show comments” works on a post. See Comments and search.
- Go through the list in SEO.