New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eleventy-plugin-cloudcannon

Package Overview
Dependencies
Maintainers
5
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eleventy-plugin-cloudcannon

Eleventy plugin to create CloudCannon editor details

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

Eleventy Plugin CloudCannon

An Eleventy (11ty) plugin that creates CloudCannon editor details.

version badge downloads badge

Installation

Available on npm.

npm install eleventy-plugin-cloudcannon --save

Add the following addPlugin call to your module.exports function in the Eleventy config file (.eleventy.js by default):

const pluginCloudCannon = require('eleventy-plugin-cloudcannon');

module.exports = function (eleventyConfig) {
  eleventyConfig.addPlugin(pluginCloudCannon, options);
};

If you set custom dir values for your site, pass them to the plugin as well:

const pluginCloudCannon = require('eleventy-plugin-cloudcannon');

module.exports = function (eleventyConfig) {
  const config = {
    dir: {
      data: '_my-custom-data',
      layouts: '_layouts',
      includes: '_my-includes'
    }
  };

  eleventyConfig.addPlugin(pluginCloudCannon, config);

  return config;
};

To ensure your site stays up to date with future plugin versions, add the following to your _cloudcannon-prebuild.sh:

nvm use 14
npm update eleventy-plugin-cloudcannon
npm install
rm -rf cloudcannon
cp -R node_modules/eleventy-plugin-cloudcannon/cloudcannon .

Options

Matches what you set or return in your main config. All optional, including the parameter itself.

KeyTypeDefaultDescription
pathPrefixstring''Custom pathPrefix setting your site uses
inputstring'.'Custom input path your site uses
dirobject{ data: '_data', includes: '_includes', layouts: '_includes' }Custom paths your site uses (if any)

Data

This plugin reads data from cloudcannon if available (defaults to _data/cloudcannon.json or _data/cloudcannon.js).

Details on each property here are listed in the relevant parts of the CloudCannon documentation.

The following is an empty template as an example.

{
  "timezone": "",
  "collections": {
    "projects": {
      "path": "",
      "name": "",
      "title": "",
      "output": false,
      "_sort_key": "",
      "_subtext_key": "",
      "_image_key": "",
      "_image_size": "",
      "_singular_name": "",
      "_singular_key": "",
      "_disable_add": false,
      "_icon": "",
      "_enabled_editors": null,
      "_add_options": []
    }
  },
  "_comments": {},
  "_options": {},
  "_editor": {},
  "_source_editor": {},
  "_array_structures": {},
  "_enabled_editors": null,
  "_select_data": {}
}

License

MIT

Keywords

FAQs

Package last updated on 18 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc