Getting to Know Grav

Tomorrow is Reclaim Hosting’s second Workshop fo One’s Own, and it’s high time I collect some thoughts for my session about Grav for the attendees.

So, what is Grav? It’s a content management system (CMS) or, said another way, it’s an application to make websites. But differs from other CMSs like Drupal or WordPress in its underlying technology. While it’s a PHP app like those two, unlike them it does not have a database. All data is written directly to files rather than stored and retrieve from a database. This is known as a flat-file system and it can help with performance given numerous database calls can slow down sites.

Why and when would you use Grav? I’m not sure I would push a faculty member or student towards Grav if they weren’t somewhat technically-inclined. It’s not that Grav is particularly difficult, every CMS has a learning curve, but rather it gets really interesting when you can integrate it into Github using the Github Sync plugin, which sync everything on your Grav site to a Github repository for others to contribute to, clone, or fork. 

But is it educational? Thanks to the great Paul Hibbitts, absolutely. One of the cool things Paul has been doing is building packages with predefined themes and plugins to create a focused functionality.  We have these as part of our shared hosting servers, and they add fun options like a Resume, Photo site, Open Course Hub, etc. In many ways it is quite similar to what Brian Lamb and Alan Levine imagined with their SPLOTs.

In fact, the  package are well maintained, in fact Paul just updated a few Installatron packages at Reclaim Hosting, and you can try it out on our demo server at stateu.org.

To get more familiar with Grav, I actually installed and played around with the Open Course Hub package to re-make the Workshop website.

The original is a course/blog theme designed by Paul that I used his package to install on Reclaim and then synced with Github (which the wizard makes quite simple if you have an account). I deleted much of the pages in the original and keep the sidebar and page structure—notice the “Edit This Page” link that leads you to Github.

One of the issue I ran into as I was getting acquainted with Grav through the Open Course Hub package is that changing the menu structure or the blog post structure took me a bit to figure out. This is always the case with learning new systems, but when installing these packages you may feel somewhat tied to the pre-existing structure.

I’ll provide a quick anatomy of the homepage in my Grav to explain what I mean. Here is a look at the Grav pages management area:

Page Management Area of Grav

The pages under home are part of the blog. Keep in mind Grav is not necessarily a blogging engine, so the blog functionality is a bit of an addon that you need to build which depends in part on your theme. Paul setup the Open Course Hub that it would have the blog feature enabled by default. The blog posts are known as “items” and you can see the content for the “Day 1 (March 15th)” post below:

Text Editor for Blog Item in Grav

Like Ghost, Grav is built to write using Markdown and you can see in the Content tab that it has a basic visual editor similar to WordPress. The other tabs are where you would control various features of the item.

In the Options tab you can update the date of the post, the status (published, draft, etc), add categories, tags, etc. 

In Advanced you can control parent page, template, ordering, etc.

In Blog Item you can add featured image, link, summary excerpt, etc.

In retrospect it is simple enough, but after being so trained to think through the WordPress dashboard it’s amazing how much of something as simple as creating a post you take for granted.

So, I’ll be saying as much and more this Friday when I show off  Grav to a group of folks to give them a better sense of some of the options afforded through open source applications like Grav and their dedicated community members like Paul that make these applications that much better.

Also, please leave additional talking points, recommendations for examples, and even critiques of what I wrote above in order to help me fine-tune this bit of Workshop of One’s Own.

This entry was posted in Workshop of One's Own and tagged , . Bookmark the permalink.

5 Responses to Getting to Know Grav

  1. Thanks so much Jim for continuing to share your experiences with Grav so far, they’ve been awesome to see!

    As you’ve mentioned, Grav’s file-based structure is a natural for syncing with a Git repository (which for me means truly open content in a platform-independent format i.e. Markdown). This is also automatically done with Open Course Hub theme files too, which means more tech-savvy folks can provide hands-on help to others with developing their Grav sites – that’s a game changer too in my mind for the Higher Ed platform space.

    Hope you get a chance to soon explore the ‘chromeless’ feature for embedding Grav content (with Git Sync) seamlessly into your most/least favorite LMS – looking forward to hearing your thoughts on that one!

  2. Mark Coster says:

    I can definitely vouch for Grav and Paul’s Open Course Hub skeleton and theme. And Paul is amazingly active and responsive to feedback. It’s been a pleasure to work with, and the git sync is fantastic. My workflow now is to develop and test locally on my pc using Atom text editor and MAMP, then use Github Desktop to push the changes when they’re ready to go live. My current live teaching site is https://3105nsc.mcoster.net

    My experience with Open Course Hub has made me a real Grav fan, so I’ve also used Grav to build a side project site for my new tutoring/coaching venture – https://orgchemcoach.net

  3. Tim Clarke says:

    Hi Jim,

    I would add my support for Grav, too. I’d add to your great post that Grav supports markdown very nicely, and that content creation can happen totally outside the admin interface by simply dropping a file into the content area and following the directory naming convention used by Grav. This means that scripting and auto-generation of content can happen, and can display nicely within your Grav site.

    Second, because you’re interacting with flat files, search-and-replace across many files is manageable with scripts, too. This is really appealing when you think about managing a knowledge base, for instance. It’s why our Domains support documents at Muhlenberg are contained within a Grav site. I pull (and credit) Domains support documents from OU and used some search-and-replace tricks to substitute Muhlenberg for OU, for instance. No database queries, no WordPress plugins. Good old fashioned bash scripts.

    I have other good things to say about Grav – and even more about Paul’s work with it – but these are the two big ones I’d want to point out.

Leave a Reply

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