adding a cms

8/9/2021 3-minute read

User story

In order to get a simple publishing workflow - to keep creation, review and publish apart

I need to have add a simple CMS (content management system)

while currently I can only publish directly or on request

acceptance criteria:

  • When I go to the website

    and add /admin/ to the URL

    then I’m asked for login (authenticate)

    after successful login I see a simple CMS with workflow

Intro: netlify-cms

according to their own website https://www.netlifycms.org it is:

  • Netlify CMS is an Open source content management for your Git workflow
  • currently supports various kinds of Gits (GitHub, GitLab, Bitbucket, Azure [DevOps])
  • Use Netlify CMS with any static site generator for a faster and more flexible web project
  • Netlify CMS is built as a single-page React app. Create custom-styled previews, UI widgets, and editor plugins or add backends to support different Git platform APIs. Getting started is simple and free. Choose a template that’s pre-configured with a static site generator and deploys to a global CDN in one click.

github

find the CMS on github at https://github.com/netlify/netlify-cms/ -

netlify-cms and netlify

I don’t know the history and it may sound a bit confusing that both share the same name but https://netlify.com (the hosting service) and CMS https://netlify-cms.org can work together but also used independently of each other - means: you can build a (jamstack) website with a tool of your choice and deploy it to netlify.com - and you can *build* a jamstack website and deploy it to whereever you like (of course *also* to netlify.com if this is your preference).

jamstack

I first heart of jamstack ( Javascript + API + Markup ) in 2015 in context of netlify.com - and it has gained a lot of reception since then. The core concept is to go back to (mainly) static website delivery - which results in super-scalable, super-secure and super-fast websites - however, these websites appear “dynamic” (instead of appearing as static, stiff, boring etc) to the visitors due to modern frontend technologies loading content on demand and based in visitor action or behavior - as seen in many mobile apps build on Angular or Ionic. If you are interested in some background you may want to start here:

get started

the real smart thing here is that there is almost not installation required: No webserver, no database - the code is running in your browser and calls the Git API for everything it needs.

There is just one thing: authentication - pure front-end or SPA (single page applications) cannot contain “secrets” due to its nature being downloaded and executed in the web browser.

So we need a server-based support for this purpose - but Azure AD provides a service which we can use right away - if you build it without Azure there are alternative blueprints available.

But for the following we will use Azure

abc