Javascript SDK for Contentful's Content Delivery API.
Contentful is a content management platform for web applications, mobile apps and connected devices. It allows you to create, edit & manage content in the cloud and publish it anywhere via a powerful API. Contentful offers tools for managing editorial teams and enabling cooperation between organizations.
- Content retrieval through Contentful's Content Delivery API.
- Synchronization
- Localization support
- Link resolution
Browsers and Node.js:
- Chrome
- Firefox
- IE11 / Edge
- Safari
- node.js (0.10, iojs-3.x, 4.x, 5.x)
Other browsers should also work, but at the moment we're only running automated tests on the browsers and Node.js versions specified above.
In order to get started with the Contentful JS SDK you'll need not only to install it, but also to get credentials which will allow you to have access to your content in Contentful.
In node, using npm:
npm install contentfulOr, if you'd like to use a standalone built file you can use the following script tag or just download it from npmcdn, under the browser-dist directory:
<script src="https://npmcdn.com/contentful@latest/browser-dist/contentful.min.js"></script>Using contentful@latest will always get you the latest version, but you can also specify a specific version number:
<script src="https://npmcdn.com/contentful@3.0.0/browser-dist/contentful.min.js"></script>To get content from Contentful, an app should authenticate with an with an OAuth bearer token.
You can create API keys using Contentful's web interface. Go to the app, open the space that you want to access (top left corner lists all the spaces), and navigate to the APIs area. Open the API Keys section and create your first token. Done.
Don't forget to also get your Space ID.
For more information, check the Contentful's REST API reference on Authentication.
- Contentful's JS SDK reference
- From version 3.0.0 onwards, you can access documentation for a specific version by visiting
https://contentful.github.io/contentful.js/contentful/<VERSION> - For versions prior to 3.0.0, you can access documentation at https://github.com/contentful/contentful.js/tree/legacy
- From version 3.0.0 onwards, you can access documentation for a specific version by visiting
- Check the Contentful for JavaScript page for Tutorials, Demo Apps, and more information on other ways of using JavaScript with Contentful
- Contentful's CDA REST API reference for additional details on the Delivery API
This project strictly follows Semantic Versioning by use of semantic-release.
This means that new versions are released automatically as fixes, features or breaking changes are released.
You can check the changelog on the releases page.
contentful.js 3.x was a major rewrite, with some API changes. While the base functionality remains the same, some method names have changed, as well as some internal behaviors.
See the migration guide for more information.
Please open an issue
See CONTRIBUTING.md
MIT