Github as Content Management System (CMS)

Posted: 2020-09-22 | Updated: 2020-09-22 | Read Time: 4 minute(s)

Background

Some time ago, I wrote about me converting my website from a database-driven Content Management System (CMS) website to a static website that uses a Static Site Generator (SSG).

Here are some ways that Github can be used a Content Management System (CMS).

Little Tech Knowledge Required

Once the website it set up on Github (most likely by a technical user), non-technical users can make the updates to the website from the Github website. Very little assistance would be needed as there is plenty of documentation on Github about how to update an existing repository and similar amount of documentation about how to do formatting with Markdown.

No SSH or SFTP

When updating some Content Management Systems or their plugins, you have to manually login to the server and upload the new files. Most non-technical users are not familiar with SSH or SFTP. Thus if they want to keep their website from being hacked or extending its functionality, then they would have to learn these things. This knowledge is not required if you want to add features to your website when hosted by Github. Depending on what you feature you are trying to implement, you can just login to the Github website, make the necessary updates, and commit the changes... all within the web browser.

No Plugin or Module Updates or Vulnerabilities

When you are not using Wordpress or Drupal, there are no plugins or modules to update. That means that you spend less time doing maintenance on your website and more time actually creating content and getting work done.

Plugins or site updates are when the most hacking attempts take place. When it comes to Drupal, there was a security patch notice that was sent out to users that had subscribed to their update alerts. In a follow up announcement, Drupal mentioned that if you had not updated your website within 7 hours of the notice being sent, then consider your website hacked or compromised. That basically means that if you were not reading the email as soon as it was received and being performing the update, your website was probably compromised. Nobody is ever just waiting for an unannounced email to be received.

One of my websites fell victim to a hacking attempt. I will admit, having backups of your database are helpful when those things occur. That the most recent backup did not have a number of recent changes, so it too more effort to restore the website as the bad data and files had to be removed from the server and the database cleaned up so that it would not reference them and throw errors.

Leverage Github Actions

Some of the features that you would normally have build into a website that is based on a Content Management System, such as sending out newsletters, can still be done through the use of Github Actions. While the implementation of some of these features may be more involved than installing a plugin on to a website, there is a great chance that you will not have to update them that often or at all once they are implemented.

Spell Check Example

For example, on this website, I have a spell check action enabled through Github Actions. It is configured that each time an update is pushed to Github, that the spell check is performed. If a misspelled word is found, then that update is not allowed to be deployed to production. Thus the mistakes that exist on your website are few to none.

SSG (Static Site Generator)

Most websites do not need to have the complexity of a social media, banking, or online learning website. This is especially true for those of you who have a website that is solely used as a blog. Thus why would you use a tool that is more complex than what is required for the job. That would be the equivalent of driving an 18-wheeler to pick up your 2 kids from school... doing way to much. Github allows you to build websites using Jekyll, which is one of many SSGs (Static Site Generator) that exist. This website uses MkDocs, a SSG that is made with Python. SSGs allow you to write your content in Markdown or HTML and through the use of templates, converts each file into a full HTML page.

At the time of this writing, there are about 120 blog posts and another 15 pages on the site that have to be generated. This takes about 5 seconds per build run to generate all the HTML, CSS, and JS files that are used on the website. That's pretty quick if you need to make a site-wide color change or template change.

Conclusion

If you are using Drupal or Wordpress for your blog, consider switching to a static website that is generating with Github. There are many features that will make website updates easy that you can add on through the use of Github Actions.

Published: 2020-09-22
Updated: 2020-09-22
Author: Kenny Robinson
Category: Technology
Keywords: cms, content management system, drupal, wordpress, static websites, static site generator, database websites
Read Time: 4 minute(s)