A non-coders take on Grav.


The truth is I can’t quite code. True I learnt BASIC and HTML in school and a smattering of C and C++ and C# after college. But my understanding is quite basic. Better for fixing things that building them from scratch. While I have been remedying this recently with an amazing book on Front End development by The Big Nerd Ranch (amazing find), I still turn to using a Content Management System (CMS) to build my websites, regardless of what size they are. Which to be frank isn’t quite efficient for smaller sites.

My go-to CMS has always been WordPress. Having learnt how to setup a WordPress installation by myself through trial and error over the years. Sure I can to a certain degree customise a theme to fit my needs. Themes like the Be Theme for example allow quite a degree of flexibility in building what you want, while other themes just work without fuss out of the box. WordPress is fantastic in terms of the kind of functionality you can build in using plugins and the sort. But what about when you have a simple microsite that probably doesn’t even need a database to run.

Very often we are tasked with building something that by its very nature would have a short shelf life. Yet these are sites that have depth. Having more than 10 pages, (small sites after all can be hard coded with ease) and where you expect to do a lot of client revisions. Like the time we literally built a website for a client overnight around a new ‘No Smoking’ law. Is there a solution out there that could prove viable for coding noobs or agencies that may want to build these robust, responsive micros sites for their clients?

This was what sprung to mind when I chanced upon the concept of a flat CMS by accident. Something that could run off from a single folder installation that did not need a dedicated database. Sounded good. This meant that once the site was coded on your local computer you could just upload the thing to your server and it would work. Yet a site that offered you the convenience of a CMS for making content edits on the fly with an admin panel and the ability to add different contributors.

Enter Grav. A flat CMS that caught my eye for its apparent simplicity. The project I had in mind was putting up my Grand Father’s poems online. This would mean a simple site that hosted around over 30 poems. Grav seemed to be packaged a bit better than the other flat CMS systems available and there seemed to be a decent amount of documentation to give it a chance.

My first thought was to install the base Grav package. My server as you can figure runs several WordPress Installations and I created a new folder for this new site in my root directory. Straight out of the box I couldn’t get the admin page and welcome screen to show. After pouring through the documentation I figured an edit with the HTA access file was needed. Voila! This got me up and running. I tried installing the theme I wanted to my server but I think I got something wrong. I think I had no clue how to customise the theme correctly. So I started again by picking a Grav skeleton, which is the base installation and a theme packaged into it with dummy content and tried uploading it with the necessary HTA access edit. Now we were talking!

My first impression with Grav is a little mixed. One of my biggest gripes with it so far is that it uses Markdown. Which is a way you format your texts and posts instead of using HTML. Unlike WordPress, Grav doesn’t seem to allow you access to the HTML code that Markdown generates. What this means is that some of those easy HTML hacks that you learnt over the year just don’t work. So the simplest of things in HTML are quite confounding in Grav. Like trying to insert a line break after a H1 tag. I finally found that though Grav doesn’t accept a <BR> or <div> or <p>with alignment, it did take a &nbsp; tag. The other simple task which I couldn’t figure out was getting content to centre align. This still remains a mystery to me.

Tables in Grav also look a little bit more painful than actual just coding a table in HTML. What I would have loved was Grav to have WordPress WYSIWYG editor capabilities. That would make this CMS really rock.

I uploaded the site to a folder and added content online. On finishing the site, I realised I had made a mistake in the name of the folder and decided to change it using my FTP client. I suddenly discovered that while the site’s homepage loaded, the rest of the site wouldn’t. After a lot of digging around I discovered that once again I would need to edit my HTA Access file with my new folder’s name to get the site to work once more. Some final tweaking and edits to the theme and I have it working more or less to what I need. There might be a few things to iron out still.

Grav is definitely growing on me and it warrant’s more inspection and testing for sure. I do need to experiment with making custom layouts and installing more plugins. I just need to see if it gives me the kind of flexibility that I need to build custom micro-sites in the future from scratch, and not have to rely on a theme. Keeping in mind my limited coding skills. This is something that I can achieve quite well with WordPress’s BE Theme. But that’s another story.

The site built in Grav is – Bouquet of Poems can be seen here.

Leave a Comment

Your email address will not be published. Required fields are marked *