Posted on

At work we mainly use the Drupal CMS, which is designed to be extremely customizable and has modules to cover every need, but this flexibility requires a ton of abstraction which has it’s own drawbacks. While the Drupal system is the best all-in-one solution we’ve found for a variety of reasons, there are many cases where a simpler solution might be superior.

There are many other CMS options options, such as wordpress, joomla and others, but none of these really follow my ideas of what a CMS should be (a topic for a whole other article), and their complexity has a lot of drawbacks in that their surface area for attacks is large, it’s complex to modify them, and they’re slow without extensive and complex caching layers.

What I want is a true developer CMS, one that makes customization easy, so that even if the functionality isn’t available out of the box or in an add-on module, that I can quickly tweak it to do what I want. Most of our customers don’t go beyond adding content and menu items - some things like Drupal’s content type field and display GUI’s more often get in the way than help, and clients don’t use them anyway. For the customers that do want that functionality, Drupal’s probably going to be the best solution.

So, this weekend I experimented with Grav CMS.

Why Grav? I really like the idea of a flat-file CMS. Although databases offer a ton of advantages, databases are best at dealing with highly structured data, while html content is mostly unstructured. Also a flat file CMS allows you to store the whole site in a versioning system to replicate the entire site (say, for moving to a development server) with a simple git clone and immediately be ready to go.

Grav CMS

I elected to install the version including the admin console, so that I can add content without needing command line access, but it is available without any admin interface in which case content would be added by creating files with a specific structure.

Installation

Installation was fairly simple, initially I had permissions set up incorrectly which caused a WSOD, but upon fixing that it had a friendly screen that warned about a few things I needed to change and then installed itself.

After installation I was prompted to create an account and was then released into the CMS. Performance was very good, the included theme is very elegant, the interface clean, and easy to use. It uses a twig templating system. I’m not a fan of twig, but it’s the go-to template system for PHP, so to be expected and I already have experience with it.

Functionality

For a relatively new and small CMS, there are a bunch of plugins available, some from the official Grav developers. I proceeded to install plugins required to meet my basic CMS requirements.

Editing content is fairly easy to do, I’m used to markdown syntax, so it’s fairly straightforward to edit content, and the drag and drop file upload made it easy to add images - a big plus here.

It comes with a command line tool, which requires no separate install, which is fantastic. Coming from Drupal, using drush and composer this is a big plus for me.

Problems

Minor Gripe: When creating a new page, “folder name” is described as the “file system path”, but it’s actually the URL path (similar to Wordpress slug or Drupal Alias) at which the page will be served. It’s actually called a slug in documentation, but not on this page, which is confusing, but it does auto-fill this for you based on title so not too much of a problem.

However, it doesn’t set the “ordering prefix” by default. It’s up to you to go in and set it on the page config or in the filesystem. Menu ordering does not work unless this is done, so it’s a bug. Eventually, it did start defaulting to enabling the ordering prefix, but then it required two saves for it to take effect with a menu reordering so still a bug.

Likewise, setting the page visibility to “auto” did not make the page “visible” [to the world] initially, which required me to make changes under the advanced configuration to fix it.

The comment plugin did not work at all, I simply received a 500 error when accessing the page, which resulted in code displayed on the screen, even when not logged in. While the CMS developers certainly can’t be expected to guarantee that user-supplied plugins are functional and stable, this is an official plugin by the Grav developers.

Conclusion

Ultimately, I chose to end my experimentation with Grav CMS, and try some other options.

« Back to home