docpad-plugin-schema

2.7.0 • Public • Published

docpad-plugin-schema

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
Slack community badge Patreon donate button Gratipay donate button Flattr donate button PayPal donate button Bitcoin donate button Wishlist browse button

Lets you attach JSON schema to your collection

Install

Install this DocPad plugin by entering docpad install schema into your terminal.

Usage

To use this plugin you need to add schema record into plugins object in docpad.coffee. Fields must match collection names, so if you have defined collection posts here is example how it can look.

plugins:
  schema:
    posts: require './schema/postSchema.json' # schema for posts collection

Schema is compliant with JSON Schema draft v4.

Basic usage:

{
  "type": "object",
  "properties": {
    "metadata": {"type": "string"},
    "sort_metadata": {"type": "number"}
  },
  "required": ["metadata", "sort_metadata"]
}

TODO

  • better readme
  • more test coverage
  • attach complex schemas

To be implemented if there is someone to actually use it, so feel free to file issues

History

Discover the release history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Patreon donate button Gratipay donate button Flattr donate button PayPal donate button Bitcoin donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

License

Unless stated otherwise all works are:

and licensed under:

Package Sidebar

Install

npm i docpad-plugin-schema

Weekly Downloads

3

Version

2.7.0

License

MIT

Last publish

Collaborators

  • sdomagala