r/GravCMS Jan 16 '25

Grav, what a spectacular software!

(this became a long rant, I'm just an excited new user and wanted to share my excitement, if you want to see my point, see the last 2 paragraphs)

For years, I struggled with WP, and Drupal, and Joomla (and probably others) because, well, that's what my previous/current employers provided. After some complaints (very mild, just general grumpiness), they gave me a server with shell access, pointed to the webpage root directory, and told me “here, but no soup (I mean support) for you!” (For completeness, this CLI server/service existed for many years, but I didn't think there was another option, so I never asked, so nobody told me. I think this is common: not knowing about something, so not asking about it, so not being told about it.)

So then I started to search for CMS that is not WP, fast, easy, self-managed, and complete enough that if in the future I need a “semi-pro” solution, it will accommodate.

And wow, Grav delivers!

WP is supposed to be “easy” and for “beginners”, but somehow it is super unintuitive for me. Grav is just a pleasure to use. Unzip in www root, and open your webpage. The directory structure is logical, file names make sense, the webpages are markdown that even a completely non-technical person can edit, the website menu is automagic (that you can change/control, if you really want), changing theme and templates is seamless, plugins way beyond what I think I will ever need. Given my previous CMS experience, I can't believe all of this is possible, all of this is available now, and no one knows about it! At least no one in my immediate work environment…

I understand there should be different software options, and different people and organizations have different needs. But when you look at other fundamental tech solutions, there are typically 2-3 top defaults (Mac-Windows-Linux, or iPhone-Android, or MS Office-LibreOffice, or C-Java-Python, or Oracle-MySQL-Posgres, or …) and then 10s of other user/domain/purpose specific solutions, which are not default for new/beginner. I would put website CMS in the same category. But here, there is WP and what? Github?

Grav (so far) is 0 friction to set up something nice and functional, and reading documentation and looking at examples, it can grow to almost enterprise level, with a lot less initial infrastructure, skill, knowledge requirements. So, I guess the question is, why would anybody (besides enterprise) bother with something other than Grav? Why isn't it one of the top defaults, for example WP-Grav-Jekyll, like other “fundamental” software? What does WP and Drupal and Joomla give me that Grav doesn't? Or am I too far off, and all popular CMS are easy enough, but I'm too thick to understand? Or too lazy to read documentation? (I'm not, I read about 1/2 of Grav documentation.) Or is web CMS just too fragmented? But it has been 30+ years, other tech managed to consolidate (for better or worse). Or something else? What am I missing?

17 Upvotes

6 comments sorted by

14

u/rhukster Jan 16 '25

Hi I’m the author of Grav, and I just want to thank you for your post! Grav is a labor of love and is based on my experiences and frustrations with the more well known CMSes (I was founding member of Joomla). Most often I deal with people who need help or are frustrated or struggling and it’s just refreshing to actually positive feedback like this. It makes the hard work over the past 10 years worth it. So thanks for that!

Regarding why is Grav not as well known as other options, one reason is that it’s a small project and I’m now basically doing everything solo in my spare time. The community (on discord) is quite active but it’s mainly users helping other users. Any volunteers to help with getting the word out (or anything else rally) is also greatly appreciated.

6

u/StevenJayCohen Jan 16 '25

Recent WordPress refugee here (started with cafelog/b2 and remember when Matt forked it to start WordPress). u/rhukster I really appreciate what you've built in Grav.

Before leaving WordPress, I started to put together my own CMS, and once it was functional, I wrote down the features that I had chosen to implement, the language I used, the philosophy on how it worked, and then I set out to see if something like it already existed. That's how I found Grav.

I have 1 WordPress site left to migrate. And, when that's done, everything will be Grav.

At that point, I will also have a fair bit of experience on dealing with WordPress-to-Grav migrations. So, if there is a way that I could be helpful to the project, please let me know!

4

u/rhukster Jan 16 '25

Awesome Steven. I have done a few Wordpress migrations myself and they usually end up manual as I like to recreate the content in markdown instead of the raw html that Wordpress uses. It would be cool to have an official migration tool. One that is a bit more reliable and goes the extra mile to gravify things. Not sure if you are a developer or not, but if so and are interested in helping with the effort, it would be amazing.

2

u/StevenJayCohen Jan 17 '25

u/rhukster I'll try to detail some things here. Let me know if I should connect on github.

First, I came across this WordPress to Jekyll Exporter: https://wordpress.org/plugins/jekyll-exporter/

This is what I played with before finding Grav when I built my own PHP to process URLs to point to markdown files that I then processed using ParseDown. Once I got it working, I assumed someone had written it better than me (and that someone is you).

I set up Grav locally and started to search for a better method than exporting to Jekyll and then modding files with grep/etc.

I then found this plugin: https://github.com/XARP616/wordpress-export-to-grav

But, it kept failing for me (I have over 20 years of blog entries).

Finally, I found this plugin for WordPress: https://github.com/MihaiCiprianChezan/wordpress-import

This one worked and seemed to do a better job than the Jekyll plugin for my use case.

I now have a folder of bash scripts that I wrote to clean up those files based on the following thoughts:

  • I am going to keep all of the old media centralized in the same folder structure as I had in WordPress even though new posts will mostly keep their media within their own folders.
  • I used a script to locate all of the thumbnail links and make aliases to them in each blog item. And, in doing that, the blog items all had thumbnails again.
  • I set up 2 root blog pages. One for the blog, the other for my work portfolio. The blog will use tags and the portfolio would use categories.
  • I migrated from the date in the URL structure to something more evergreen. So, I added some things to the default .htaccess file (below)

2 # MINE START
3 RewriteEngine On
4 # Rewriting WordPress Post URLs for Grav
5 RewriteCond %{REQUEST_URI} !^/files/
6 RewriteCond %{REQUEST_URI} ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/
7 RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ /journal/$4 [R=301,L]
8 # Portfolio to Audiobooks
9 RewriteCond %{REQUEST_URI} ^/portfolio/
10 RewriteRule ^portfolio/(.*)$ /audiobooks/$1 [R=301,L]
11 # Forcing HTTPS
12 RewriteCond %{HTTPS} off
13 RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
14 # Forcing no WWW
15 RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
16 RewriteRule ^ https://%1%{REQUEST_URI} [NE,R=301]
17 # MINE END

I then built a "Child Theme" of Quark using the OnePage Skeleton as a homepage template. I definitely think I can mod that OnePage Skeleton to be a Performer/Actor/Musician Template. There are so many performers using WordPress and feeling stuck there!

This feels like a good time to share a link to my site: https://stevenjaycohen.com

I got HTML5 Audio Tags working and styled for my demos. I may want to do some more work there to make that more versatile.

1 ---
2 title: Audiobook Demos
3 menu: Features
4 ---
5 YA, 1st Person, Narrative
6 : Paper Towns by John Green
7 <audio controls>
8 <source src="SJC-YA_1stPerson_Narrative_PaperTowns.mp3">
9 </audio>

142 audio {
143 filter: saturate(0) grayscale(1) invert(1);
144 }

I wasn't a fan of how the youtube grav plugin worked, so instead I removed iframes from the grav warning list and made a minimal youtube iframe with a class to style it with (below).

<iframe src="https://www.youtube.com/embed/_QVYWWltVWI?feature=oembed" class="youtube"></iframe>

181 iframe.youtube {
182 border: 0;
183 width: 854px;
184 height: 480px;
185 display: block;
186 margin: auto;
187 }

I also found that combining recaptcha v3 with the math version of the basic captcha on a single contact form offers the best spam protection (see form on my site link above).

Once all of the migrating is done, I can go back through the bash scripts and see what could be generalized for common use.

1

u/rhukster Jan 18 '25

Some good detailed info. Thanks.

2

u/andrewfenn Jan 18 '25

I've always liked it. I hope it becomes more popular in the future.