Build­ing My Site Part I: Decisions

Publisher: TJ Fogarty

Modified: 2018-03-13

Mak­ing deci­sions can be an ardu­ous task. With the blitz of build-tools and boil­er­plates it can be sur­pris­ing­ly com­plex to arrive at a well-informed selec­tion of tech­nolo­gies. It seems like the more you know, the less you do.

With that, here’s what I end­ed up with, and why.

Results #


Some His­to­ry #

Before all this I had a self-host­ed ver­sion of Ghost. It’s a dead­ly plat­form and incred­i­bly easy to get up and run­ning with. After a while I decid­ed to move to a host­ed ver­sion with them when I had less time for main­te­nance. It was less for me to think about. It also meant I couldn’t break the serv­er which hap­pens when I start tin­ker­ing too much. I could rest easy know­ing these folks had it all sorted.

When I had a bit more time, I moved to GitHub Pages to have a bit more con­trol over the build. I real­ly liked the idea of being able to make theme-relat­ed changes that take effect with a sin­gle git push.

Not long after, I start­ed to long for a bit more con­trol over the func­tion­al­i­ty not only afford­ed by the front-end, but by what hap­pens behind the cur­tain as well.

Head­less CMS #

This is the new cool kid on the block, and I want­ed to see what it was all about. After look­ing through a few options, I had a go of Con­tent­ful. I had a blog pro­to­type set up pret­ty quick­ly with Vue.js as a sin­gle page appli­ca­tion. It was pret­ty nifty if I do say so myself. I gave myself a pat on the back and thought yep, this is it”. 

After about 20 min­utes, how­ev­er, I realised I need­ed serv­er-side ren­der­ing to make it more acces­si­ble. I want­ed to get the ball rolling quick­ly, and this was some­thing that I felt would be a bit of a time sink. I scrapped it and decid­ed to keep moving.

Craft #

I’ve worked a lot with PHP-based projects includ­ing Word­Press, Expres­sio­nEngine and Lar­avel. I want­ed to use some­thing that I was famil­iar with in order to extend it with any cus­tom func­tion­al­i­ty I might need/​want. The Twig tem­plat­ing lan­guage is also some­thing I’m quite fond of when it com­plete­ly changed how I worked with Word­Press. Lucky for me, this is where Craft came in.

I’ve used it before, and real­ly liked how straight-for­ward it was to get going with. I thought about using Word­Press, and while I still have great time for it, I want­ed to explore some­thing different.

Craft is also near­ing it’s release of ver­sion 3, so I fig­ured it was a good time to get back into it and see what’s changed since I last used it. Spoil­er: it’s look­ing pret­ty frickin’ good. They also have a gen­er­ous pric­ing plan for per­son­al use: it’s free!

With that I pulled down the lat­est ver­sion of V3 that was avail­able and start­ed port­ing my posts over.

Lar­avel Mix #

Again, famil­iar­i­ty. Lar­avel Mix wraps itself around web­pack like a blan­ket with a high thread count, and gives you a dead-sim­ple way to get up and run­ning quick­ly. If you need to dig deep­er you can extend the con­fig­u­ra­tion to suit your needs.

It was recent­ly updat­ed to include async/​await straight out of the box, which is one less thing to hack about. I like not hav­ing to think some­times, even if that saves me man­u­al­ly adding a depen­den­cy and updat­ing a dotfile.

Host­ing #

I stat­ed ear­li­er that I have a ten­den­cy to break things when I have the ter­mi­nal open in front of me. Time pro­gressed and since then I’ve learned enough to be dan­ger­ous. I signed back up with Dig­i­tal Ocean because this time I had a secret weapon — Lar­avel Forge.

Forge is suit­able for any PHP project, and pro­vi­sions a serv­er with a few clicks. It also lets me watch a branch on a repo and can deploy any time a push is detect­ed. It’ll run a script as well, which means I can run things like npm run production to cre­ate a pro­duc­tion build of my assets.

Here We Are #

This has led to the site you’re cur­rent­ly on today. I can’t say it will always be this way, but for now I’m real­ly hap­py with the end-result. You might notice the com­mon theme of famil­iar­i­ty with these deci­sions. That was some­thing that occurred after the ideas had set­tled. I want­ed a sol­id base to work from, some­thing that I had ini­tial expe­ri­ence with to get some­thing up and run­ning quick­ly. Who’s to say I won’t end up with a head­less CMS? Maybe when I learn more about serv­er-side ren­der­ing I’ll pick up where I left off. Until then, I have more rea­sons than ever to keep tin­ker­ing and explor­ing what else I can do with this setup.

Read Part II: Setup