datocms

Import posts and pages from DatoCMS

To install, run nikola plugin -i datocms

What is this?

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

How to Use it

  1. Setup your Dato site using the Nikola template
  2. Install the plugin using nikola plugin -i datocms
  3. Install the Dato CMS client inside your site using the instructions

You only need to get as far as running the dato command and getting an error about a missing dato.config.js

  1. Obtain a read-only token following the same instructions and put it in a .env file (be sure not to commit it to GitHub or something like that :-)

  2. In your conf.py add dato/posts to POSTS and dato/pages to PAGES. DO NOT USE YOUR REGULAR POSTS/PAGES folders, Dato deletes the contents of those folders!!!!

  3. Run nikola datocms

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

Automation is possible with Travis CI (general guide, but you can make it work with Dato with some work as well)

Suggested Configuration:

# In order to use DatoCMS you need to add the dato/posts and dato/pages
# folders to your POSTS and PAGES settings

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

Issues? Questions?

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