eleventy-plugin-cloudcannon
Advanced tools
Comparing version
@@ -0,1 +1,4 @@ | ||
const pkginfo = require('pkginfo')(module, 'version'); | ||
const version = module.exports.version; | ||
module.exports = function (eleventyConfig, config = {}) { | ||
@@ -13,2 +16,3 @@ const paths = { | ||
eleventyConfig.addNunjucksShortcode('ccInput', () => config.input || ''); | ||
eleventyConfig.addNunjucksShortcode('ccVersion', () => version); | ||
}; |
{ | ||
"name": "eleventy-plugin-cloudcannon", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Eleventy plugin to create CloudCannon editor details", | ||
@@ -9,2 +9,6 @@ "main": ".eleventy.js", | ||
}, | ||
"files": [ | ||
".eleventy.js", | ||
"cloudcannon/*" | ||
], | ||
"repository": { | ||
@@ -23,3 +27,6 @@ "type": "git", | ||
}, | ||
"homepage": "https://github.com/cloudcannon/eleventy-plugin-cloudcannon#readme" | ||
"homepage": "https://github.com/cloudcannon/eleventy-plugin-cloudcannon#readme", | ||
"dependencies": { | ||
"pkginfo": "^0.4.1" | ||
} | ||
} |
@@ -5,3 +5,4 @@ # Eleventy Plugin CloudCannon | ||
  | ||
[<img src="https://img.shields.io/npm/v/eleventy-plugin-cloudcannon?logo=npm" alt="version badge">](https://www.npmjs.com/package/eleventy-plugin-cloudcannon) | ||
[<img src="https://img.shields.io/npm/dt/eleventy-plugin-cloudcannon" alt="downloads badge">](https://www.npmjs.com/package/eleventy-plugin-cloudcannon) | ||
@@ -57,11 +58,11 @@ ## Installation | ||
| Key | Type | Default | Description | | ||
| ------------ | ------ | ---------------------------------------------------------------------- | -------------------------------------------- | | ||
| `pathPrefix` | string | `""` | Custom pathPrefix setting your site uses | | ||
| `input` | string | `"."` | Custom input path your site uses | | ||
| `dir` | object | `{ "data": "_data", "includes": "_includes", "layouts": "_includes" }` | Custom paths your site uses (if any) | | ||
| Key | Type | Default | Description | | ||
| ------------ | ------ | ---------------------------------------------------------------- | ---------------------------------------- | | ||
| `pathPrefix` | string | `''` | Custom pathPrefix setting your site uses | | ||
| `input` | string | `'.'` | Custom input path your site uses | | ||
| `dir` | object | `{ 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`). | ||
This plugin reads data from `cloudcannon` if available (defaults to `_data/cloudcannon.json` or `_data/cloudcannon.js`). | ||
@@ -97,3 +98,2 @@ Details on each property here are listed in the relevant parts of the | ||
"source-editor": {}, | ||
"explore": {}, | ||
"array-structures": {}, | ||
@@ -100,0 +100,0 @@ "select-data": {} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1
-50%10805
-1.22%1
Infinity%6
-25%90
-1.1%1
Infinity%+ Added
+ Added