{"id":15016625,"url":"https://github.com/cloudcannon/eleventy-plugin-cloudcannon","last_synced_at":"2025-12-12T11:47:48.614Z","repository":{"id":57222323,"uuid":"345250566","full_name":"CloudCannon/eleventy-plugin-cloudcannon","owner":"CloudCannon","description":"🔌 An Eleventy (11ty) plugin that creates CloudCannon build information.","archived":false,"fork":false,"pushed_at":"2024-04-24T03:50:50.000Z","size":915,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-24T08:15:53.937Z","etag":null,"topics":["11ty","11ty-plugin","cloudcannon","cms","eleventy","eleventy-plugin","ssg","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CloudCannon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-07T03:33:39.000Z","updated_at":"2024-06-18T00:03:12.718Z","dependencies_parsed_at":"2024-04-04T02:39:50.857Z","dependency_job_id":"33a8051d-490e-402a-b5ab-0ec90a5004ae","html_url":"https://github.com/CloudCannon/eleventy-plugin-cloudcannon","commit_stats":{"total_commits":101,"total_committers":2,"mean_commits":50.5,"dds":0.03960396039603964,"last_synced_commit":"c64871bcc0c96bd331a858d4dfb336bdf9d6fbb4"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudCannon%2Feleventy-plugin-cloudcannon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudCannon%2Feleventy-plugin-cloudcannon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudCannon%2Feleventy-plugin-cloudcannon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudCannon%2Feleventy-plugin-cloudcannon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CloudCannon","download_url":"https://codeload.github.com/CloudCannon/eleventy-plugin-cloudcannon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248556862,"owners_count":21124156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["11ty","11ty-plugin","cloudcannon","cms","eleventy","eleventy-plugin","ssg","static-site-generator"],"created_at":"2024-09-24T19:49:09.558Z","updated_at":"2025-12-12T11:47:48.567Z","avatar_url":"https://github.com/CloudCannon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eleventy Plugin CloudCannon\n\nAn Eleventy (11ty) plugin that creates [CloudCannon](https://cloudcannon.com/) build information.\n\nThis plugin runs during your Eleventy build, discovering your pages, collections, and data files to\ncreate a JSON file used to automatically integrate the site with CloudCannon.\n\n[\u003cimg src=\"https://img.shields.io/npm/v/eleventy-plugin-cloudcannon?logo=npm\" alt=\"version badge\"\u003e](https://www.npmjs.com/package/eleventy-plugin-cloudcannon)\n[\u003cimg src=\"https://img.shields.io/npm/dt/eleventy-plugin-cloudcannon\" alt=\"downloads badge\"\u003e](https://www.npmjs.com/package/eleventy-plugin-cloudcannon)\n\n***\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Plugin options](#plugin-options)\n- [License](#license)\n\n***\n\n## Installation\n\n**You don't have to install anything** when building on CloudCannon. This plugin is automatically\ninstalled before your site is built. This gives you the latest support, new features, and fixes\nas they are released.\n\nAlthough **not recommended**, you can disable the automatic installation and install the plugin\nmanually.\n\n\u003cdetails\u003e\n\u003csummary\u003eManual installation steps\u003c/summary\u003e\n\n\u003cblockquote\u003e\n\nWhen installing manually, you'll have to upgrade when new versions are released.\nYou could also follow these steps to debug an integration issue locally.\n\nStart by enabling the \"Manage eleventy-plugin-cloudcannon plugin manually\" option in CloudCannon\nfor your site in *Site Settings / Build*.\n\n```bash\nnpm install --save eleventy-plugin-cloudcannon\n```\n\nAdd the following `addPlugin` call to your `.eleventy.js` file.\nThe second parameter is optional, and used to pass [plugin options](#plugin-options).\n\n```javascript\nconst pluginCloudCannon = require('eleventy-plugin-cloudcannon');\n\nmodule.exports = function (eleventyConfig) {\n  const options = {\n    pathPrefix: '/',\n    dir: {\n      input: '.',\n      data: '_my-custom-data',\n      layouts: '_layouts',\n      includes: '_my-includes'\n    }\n  };\n\n  eleventyConfig.addPlugin(pluginCloudCannon, options);\n  return options;\n};\n```\n\n\u003c/blockquote\u003e\n\u003c/details\u003e\n\n## Configuration\n\nThis plugin uses an optional configuration file as a base to generate `_cloudcannon/info.json`\n(used to integrate your site with CloudCannon).\n\nAdd your global CloudCannon configuration to this file, alongside any optional configuration for\nthis plugin.\n\nConfiguration files should be in the same directory you run `npx @11ty/eleventy`. The first\nsupported file found in this order is used:\n\n- `cloudcannon.config.json`\n- `cloudcannon.config.yaml`\n- `cloudcannon.config.yml`\n- `cloudcannon.config.js`\n- `cloudcannon.config.cjs`\n\nAlternatively, use the `CLOUDCANNON_CONFIG_PATH` environment variable to use a specific config file\nin a custom location:\n\n```sh\n$ CLOUDCANNON_CONFIG_PATH=src/cloudcannon.config.js npx @11ty/eleventy\n```\n\nExample content for `cloudcannon.config.cjs`:\n\n```javascript\nmodule.exports = {\n  // Global CloudCannon configuration\n  _inputs: {\n    title: {\n      type: 'text',\n      comment: 'The title of your page.'\n    }\n  },\n  _select_data: {\n    colors: ['Red', 'Green', 'Blue']\n  },\n\n  // Base path to your site source files, same as input for Eleventy\n  source: 'src',\n\n  // The subpath your built output files are mounted at\n  base_url: '/documentation',\n\n  // Populates collections for navigation and metadata in the editor\n  collections_config: {\n    people: {\n      // Base path for files in this collection, relative to source\n      path: 'content/people',\n\n      // Whether this collection produces output files or not\n      output: true,\n\n      // Collection-level configuration\n      name: 'Personnel',\n      _enabled_editors: ['data']\n    },\n    posts: {\n      path: '_posts',\n      output: true\n    },\n    pages: {\n      name: 'Main pages'\n    }\n  },\n\n  // Generates the data for select and multiselect inputs matching these names\n  data_config: {\n    // Populates data with authors from an data file with the matching name\n    authors: true,\n    offices: true\n  },\n\n  paths: {\n    // The default location for newly uploaded files, relative to source\n    uploads: 'assets/uploads',\n\n    // The path to site data files, relative to source\n    data: 'data', // defaults to _data\n\n    // The path to site layout files, relative to source\n    layouts: '_layouts', // defaults to _includes\n\n    // The path to site include files, relative to source\n    includes: '_partials' // defaults to _includes\n  }\n};\n```\n\nSee the [CloudCannon documentation](https://cloudcannon.com/documentation/) for more information\non the available features you can configure.\n\n## Plugin options\n\nConfiguration is set in `cloudcannon.config.*`, but the plugin also automatically\nreads the following from Eleventy if unset:\n\n- `paths` from `dir` in `.eleventy.js` options\n- `base_url` from `pathPrefix` in `.eleventy.js` options\n- `source` from the `--input` CLI option or `dir.input` in `.eleventy.js` options\n\nThese options match Eleventy's [configuration format](https://www.11ty.dev/docs/config/) and are\nset in one of three ways:\n\n\u003cdetails\u003e\n  \u003csummary\u003eReturning from \u003ccode\u003e.eleventy.js\u003c/code\u003e with automatic installation\u003c/summary\u003e\n\n**Requires automatic installation**.\n\n\u003e ```javascript\n\u003e module.exports = function (eleventyConfig) {\n\u003e   return {\n\u003e     pathPrefix: '/',\n\u003e     dir: {\n\u003e       input: '.',\n\u003e       data: '_my-custom-data',\n\u003e       layouts: '_layouts',\n\u003e       includes: '_my-includes'\n\u003e     }\n\u003e   };\n\u003e };\n\u003e ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eSetting \u003ccode\u003eeleventyConfig.cloudcannonOptions\u003c/code\u003e\u003c/summary\u003e\n\n**Requires automatic installation or needs to be before the call to `addPlugin`**.\n\n\u003e ```javascript\n\u003e module.exports = function (eleventyConfig) {\n\u003e   eleventyConfig.cloudcannonOptions = {\n\u003e     pathPrefix: '/',\n\u003e     dir: {\n\u003e       input: '.',\n\u003e       data: '_my-custom-data',\n\u003e       layouts: '_layouts',\n\u003e       includes: '_my-includes'\n\u003e     }\n\u003e   };\n\u003e };\n\u003e ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eThrough \u003ccode\u003eaddPlugin\u003c/code\u003e with manual installation\u003c/summary\u003e\n\n\u003e ```javascript\n\u003e const pluginCloudCannon = require('eleventy-plugin-cloudcannon');\n\u003e\n\u003e module.exports = function (eleventyConfig) {\n\u003e   const options = {\n\u003e     pathPrefix: '/',\n\u003e     dir: {\n\u003e       input: '.',\n\u003e       data: '_my-custom-data',\n\u003e       layouts: '_layouts',\n\u003e       includes: '_my-includes'\n\u003e     }\n\u003e   };\n\u003e\n\u003e   eleventyConfig.addPlugin(pluginCloudCannon, options);\n\u003e   return options;\n\u003e };\n\u003e ```\n\n\u003c/details\u003e\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcannon%2Feleventy-plugin-cloudcannon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudcannon%2Feleventy-plugin-cloudcannon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcannon%2Feleventy-plugin-cloudcannon/lists"}