We needed to find a simple way to allow non-technical users to update their Docusaurus website blogs and documentation

What it does

In this repo we make a few small changes to add the NetlifyCMS to the static folder of Docusaurus so that any non-technical user can sign in to the admin area and update the website. It allows non-technical users to login once they have a Github account but can be configured to support email & password verification

How I built it

This was built using the default configurations for Docusaurus npm package and the NetlifyCMS cdn script.

Challenges I ran into

I faced a few challenges making sure that the NetlifyCMS configuration was correct based on the structure of the markdown files as well as Netlify Identity's rules for using Github OAuth

Accomplishments that I'm proud of

This was a relatively simple setup which can be utilized for version 2 of docusaurus as well (once made available)

What I learned

Docusaurus is an excellent tool for quickly getting setup to use markdown files as content for a static site however additional plugins are required to customize it to specific needs such as blogging or for a more general-purpose use-case such as using MDX which allows for integrating React components in Markdown. Unfortunately Docusaurus requires custom components in order to integrate most third-party javascript functionality despite its roots in React since it focuses more on the display of markdown than the utilization of JSX. The Docusarus team aim to solve this issue with version 2 (currently in alpha) which can be used for general-purpose static websites unlike version 1 which primarily focused on documentation websites

What's next for Editing your Docusaurus Site with NetlifyCMS

It would be amazing to include the following upgrades:

  1. Optional Email & password authentication
  2. Integrate MDX (would require custom widgets for NetlifyCMS)

Built With

  • docusaurus
  • netlify
  • netlify-cms
  • react
Share this project: