contentful

Import posts and pages from Contenful CMS

To install, run nikola plugin -i contentful

What is this?

This plugin lets integrate Nikola with a Contentful site, thus allowing you to use a web UI to create and edit posts and pages.

How to Use it

  1. Setup your Contentful site using the Nikola template
  2. Install the plugin using nikola plugin -i contentful
  3. Obtain a access token and space ID from your Contentful space and put them in a contentful.json like this:
{
  "SPACE_ID": 't2gxqu19qu62',
  "ACCESS_TOKEN": 'dd167cf8b111d9e17a46059d'
}
  1. In your conf.py add contenful/posts to POSTS and contentful/pages to PAGES.
  2. Run nikola contentful

At that point your pages and posts created in Contentful should be ready for you to use. Have fun!

Suggested Configuration:

# In order to use the Contentful CMS you need to add the contentful/posts and contentful/pages
# folders to your POSTS and PAGES settings

POSTS = (
...
    ("contentful/posts/*.md", "posts", "post.tmpl"),
)
PAGES = (
...
    ("contentful/pages/*.md", "stories", "story.tmpl"),
)

Requirements:

  • contentful (Python package)

Issues? Questions?

You can report issues with this plugin and request help via GitHub Issues.