Setup Netlify CMS with Eleventy

  Hey there! This article is being published a "work in progress," which means that it is not done. So please excuse the rough edges!

I may or may not come back and finish this article. Regardless, I hope that it's helpful in its current state.

Netlify’s guide for adding Netlify CMS to your site was really helpful. Consider this a supplemental guide to getting your Eleventy site up and running with Netlify CMS.

Your posts will probably have tags, or a list of strings for organizing content. Netlify CMS has a list widget type that will work nicely:

# admin/config.yml
- name: "blog"
- {label: "Tags", name: "tags", widget: "list"}

If you want editors to select from a specific set of options, the select widget type should work for you.

Eleventy will ignore Netlify CMS’ config.yml when building your site, so you’ll need to tell it to copy the file into your build directory:

// .eleventy.js

Note: The actual path may vary based on your project structure.

About the author

Sean McPherson is a software engineer for Khan Academy who specializes in web and mobile app development. He lives with his wife, sons, and dog in Pittsburgh, PA. (SDG)