CloudCannon Jekyll

A Jekyll plugin that creates CloudCannon build information.

This plugin runs during your Jekyll build, discovering your pages, collections, and data files to create a JSON file used to automatically integrate the site with CloudCannon.

version badge downloads badge


You don't have to install anything when building on CloudCannon. This plugin is automatically installed before your site is built. This gives you the latest support, new features, and fixes as they are released.

Although not recommended, you can install the plugin manually.

Manual installation steps
When installing manually, you'll have to upgrade when new versions are released. You could also follow these steps to debug an integration issue locally. This assumes you are using [Bundler]( to manage dependencies. CloudCannon won't automatically install this plugin before builds if `cloudcannon-jekyll` is already installed. ```sh $ bundle add cloudcannon-jekyll --group jekyll_plugins ``` Add the following to your `_config.yml` if you're listing plugins here as well: ```yaml plugins: - cloudcannon-jekyll ``` 💡 For Jekyll versions less than `v3.5.0`, use `gems` instead of `plugins`.


This plugin uses an optional configuration file as a base to generate _cloudcannon/info.json (used to integrate your site with CloudCannon).

Add your global CloudCannon configuration to this file, alongside any optional configuration for this plugin.

Configuration files should be in the same directory you run bundle exec jekyll build. The first supported file found in this order is used:

  • cloudcannon.config.json
  • cloudcannon.config.yaml
  • cloudcannon.config.yml

Alternatively, use the CLOUDCANNON_CONFIG_PATH environment variable to use a specific config file in a custom location:

$ CLOUDCANNON_CONFIG_PATH=src/cloudcannon.config.yml bundle exec jekyll build

Example content for cloudcannon.config.yml:

# Global CloudCannon configuration
    type: text
    comment: The title of your page.
    - Red
    - Green
    - Blue

# Base path to your site source files, same as source for Jekyll
source: src

# The subpath your built output files are mounted at, same as baseurl for Jekyll
base_url: /documentation

# Populates collections for navigation and metadata in the editor
    # Base path for files in this collection, relative to source
    path: content/people

    # Whether this collection produces output files or not
    output: true

    # Collection-level configuration
    name: Personnel
      - data
    path: _posts
    output: true
    name: Main pages

# Generates the data for select and multiselect inputs matching these names
  # Populates data with authors from an data file with the matching name
  authors: true
  offices: true

  # The default location for newly uploaded files, relative to source
  uploads: assets/uploads

  # The path to the root collections folder, relative to source
  collections: items

  # The path to site data files, relative to source
  data: _data

  # The path to site layout files, relative to source
  layouts: _layouts

  # The path to site include files, relative to source
  includes: _partials

See the CloudCannon documentation for more information on the available features you can configure.

Configuration is set in cloudcannon.config.*, but the plugin also automatically reads and processes the following from Jekyll if unset:

  • collections_config from collections in _config.yml
  • paths.collections from collections_dir in _config.yml
  • paths.layouts from layouts_dir in _config.yml
  • from data_dir in _config.yml
  • paths.includes from includes_dir in _config.yml
  • base_url from baseurl in _config.yml
  • source from the --source CLI option or source in _config.yml


Releasing new versions

  1. Increase the version in lib/cloudcannon-jekyll/version.rb
  2. Update
  3. Commit and push those changes
  4. Run ./script/release
  5. Create a release on GitHub


Running tests for currently installed Jekyll version:

$ ./script/test

Running tests for all specified Jekyll versions:

$ ./script/test-all-versions

Running tests for a specific Jekyll version:

$ JEKYLL_VERSION="2.4.0" bundle update && ./script/test