Need help with Drupal or Grav admin, site building, design, or content? Contact us!
Help Defend Democracy! → Join Battalion today.
Exploring the Symfony universe!
This article originally appeared on Mobile Atom Code.
In case you don't know, K.I.S.S. stands for Keep. It. Simple. Stupid. (And not a shit rock band from Detroit).
And I am sure you do know building content-oriented websites today is an overcomplicated clusterfuck.
But there is a content management system that makes it easier and simpler. And this is especially true for frontend developers.
It's Grav CMS.
They sermonize:
"The origins of Grav come from a personal desire to work with an open source platform that focuses on speed and simplicity, rather than an abundance of built-in features that come at the expense of complexity.
Preach brother.
One real downside to (popular CMSs) is they require a real commitment to learn how to use and develop on them. You really have to pick one out of the pack, and dedicate yourself to that platform if you wish to become competent as either a user, developer, or administrator.
Give me an amen.
What if there was a platform that was fast, easy-to-learn, and still powerful & flexible? (It's) clear that a flat-file based CMS (is the answer).
The core of Grav is built around the concept of folders and markdown files for content. These folders and files are automatically compiled into HTML and cached for performance.
Its pages are accessible via URLs that directly relate to the folder structure that underpins the whole CMS. By rendering the pages with Twig Templates, you have complete control over how your site looks, with virtually no limitations."
Triple amen to that.
Want to come to Jesus? Explore all Grav's features here. And peruse the documentation here.
A few quick notes:
Let's look at the reasons I chose to migrate Mobile Atom Code to Grav CMS. It's mostly because of the logo, but let me count the other ways as well. 😉
Grav is a Symfony-influenced CMS. It uses:
Aside from Sulu CMS, I have viewed Drupal as the CMS most closely integrated with Symfony. And that is why I built Symfony Station with it. It is helping me move toward mastering Symfony. This was especially true from the architecture and business logic perspectives. But Drupal is anything but simple. In fact, it's the opposite of simple in every way imaginable.
In my continual examination of the Symfony Universe I went back to look at Grav CMS. After all it was one of the finalists for my Symfony Station site.
It was easily installable with my current web hosting provider (as opposed to my former one) so I set up a subdomain and experimented with it.
And I fell in love with it because of its K.I.S.S. factor and it also operates similarly to the way I eventually want to build sites with Symfony. On the frontend it is a joy to use and will allow me to put many of the skills I learned in my coding bootcamp to work. Of course, this is years down the road, but working with Grav will also help me develop the skills I need to master Symfony's frontend. Skills like creating Symfony UX's Live Components and Twig Components.
In fact it is 99.7 percent PHP. You can't beat that.
Obviously I love and support the PHP development community. I have used it for years in my business, primarily via WordPress and lately Drupal. And I cover it extensively on Symfony Station. So Grav is a no-brainer as an option for building sites.
Symfony and Twig have the same father, Fabian Ponticier.
He created Twig as a modern template engine for PHP. And it has many benefits.
It is fast because it compiles templates down to plain optimized PHP code. The overhead compared to regular PHP code is reduced to the very minimum. It can be used for applications where users need to modify the template design. And Twig is powered by a flexible lexer and parser. This allows developers to define their own custom tags and filters, and create their own DSL.
In Grav CMS, Twig templates control page architecture and interactive behavior from plugins as well as any custom componentized Twig file. Atomic design is always best, peeps.
One of the most appealing draws of Grav is that is uses Markdown for content creation.
I was first exposed to Markdown in my coding bootcamp. And I loved it. Obviously it is used extensively in software documentation. For example GitHub uses it.
To quote Markdown Guide "markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages.
When you create a Markdown-formatted file, you add Markdown syntax to the text to indicate which words and phrases should look different" from plain text.
Nowadays, I do all my writing in Markdown via Obsidian including this article.
Grav pages can be written in Markdown (as noted above) and/or HTML.
Custom CSS and JS are added via Grav plugins. Which is fantastic because I love vanilla CSS and hate frontend platforms. I also hate JavaScript. Because Grav CMS is 99.7% PHP and uses Twig, I only have to add the JavaScript I absolutely need. Which is next to none. For Mobile Atom Code, it's only used for the progress bar that doubles as the header border.
K.I.S.S. demands native HTML, CSS, and JavaScript. No framework bullshit is allowed if you want to rock and roll all nite.
So, as you have seen Grav CMS is a wonderfully simple choice if you love using the languages of the web in their pure forms. It's quarantined from the taint of frontend platforms like Bootcrap and Failwind. And does not use any of the disasters that are JavaScript frontend platforms or libraries like React and Angular. Although if you really want to fuck up your site you can integrate them.
It is built with PHP and uses the wonderful Twig templating system as well.
And if you aren't already using Symfony to build sites, Grav will help you get there.
Thanks for reading and I hope you have enjoyed this look at K.I.S.S. and why my dumb ass moved Mobile Atom Code to Grav CMS. 😉
Happy coding!
Ringmaster
Mobile Atom Code
Symfony Station covers the essential news in the Symfony, PHP, and Fediverse development communities with a focus on protecting democracy. Please use the button above to make a small donation to help cover our out-of-pocket costs. Our labor is provided free of charge to support the communities we write about.
Subscribe to The Payload, our weekly newsletter exploring the Symfony Universe.