Blogging: The Beginning
Deciding on the platform
I'm a guy who likes to try and learn a lot of things, probably too much and definitely too much at once. So when I started this journey, I knew I needed to find a platform that worked for me.
I really enjoy React, so GatsbyJS was an obvious contender. It's very popular right now and has a huge ecosystem. I would then need to pick one of the myriad of headless CMS out there.
I thought about using a hosted platform, like dev.to. This would have simplified everything because then I could just focus on writing the content. Unfortunately, I like to be difficult, so I wanted to at least somewhat build my own setup.
I've been wanting to get more and more involved in developing in Laravel, so I thought "maybe I'll just write my own blog/CMS from scratch". Then I learned that Statamic v3 would have a completely free offering. Since Statamic is part of the Laravel ecosystem, it seemed like it would be the perfect fit.
Setting up Statamic
For whatever reason, I decided to start this process on my Windows machine that I use mostly for gaming. This was honestly a mistake, at least for me. I'm not used to doing anything like this on Windows and made the process more difficult for me. I ran into some issues with composer because I installed it from apt and the version in their repositories is old. Eventually, I prevailed and got everything setup and working great in Windows/WSL.
When I started this whole process, I was going to use GatsbyJS and host it on Netlify. I bought my domain through Netlify and everything. When I changed my mind, I was worried that this choice was going to haunt me because I would need a different kind of hosting provider for a PHP application.
I am still using Netlify because Statamic has a wonder SSG (Static Site Generator) package that you can install and generate the static output of your site.
The Blogging Process
By default with Statamic, there isn't a database. The content is all saved in a flat-file system using Markdown files. That might sound annoying to deal with, but Statamic comes with a beautiful control panel to create posts. Beyond that, you can do many other administrative tasks, like configuring various site settings, create new content types (called collections), taxonomies, upload assets and much more.
The Markdown files are the beauty of the system. It allows you to just commit them to git and deploy. You never have to worry about backing up and restoring a database to have the newest copy of the posts, or other content.
The entire writing and publishing process couldn't be more simple. I create the blog post in the control panel, commit and push the new Markdown file(s) to GitHub and then Netlify detects changes have been pushed to GitHub and starts a new deployment. It's probably a couple of minutes from the time I push the changes to GitHub until they're deployed for the world to read!
I haven't completely decided what I'm going to continue to write about. My best plan for now is to document my journey of learning Laravel as a developer who has used Drupal for the last 10+ years and comparing the differences.
I started with one of the Statamic themes just to get things going, but I do plan on either making modifications to it, or creating my own.
Other than that, it'll just be various topics that I learn throughout time. I hope that's something that interests you and that you'll come back for more.