Unisys12's Blog

My adventures, trials & tribulations of learning web development as a hobby! I mean... who does that?

So, You Want to Write Your Own Blog?

Phillip Jackson - 2014-03-11 00:10:23

First post with the new blog I wrote for myself

And the Journey Begins

Jan 18, 2014 - That was my last blog post on Blogger. I have been using Blogger since 8/17/12 and over that time, it worked quite well for my needs. But in the last year or so things just were not flowing the way I wanted. The blog creation interface did not give me the control that I wanted. Styling for the site was a nightmare. Not to mention the code that it produced, even from the HTML interface. All sorts of little things like that. As of that last post - I was boiling with frustration and I promised not only to myself, but publicly, that it was going to be my last post there. And so it was...

What to do, What to do?

Today, people have a ton of options when it comes to a personal blog/CMS. Being a hobbyist developer, I did not want to go the way of a hosted blog service. I wanted to build something from the ground up or at least have a big part in the creation of the blog. Not so much because I felt like I could build something better than anyone else. No, my ego is not that big! But because I knew it would be a great learning experience for myself.

So I set a few ground rules for myself:

Build it from the ground up. Yes, this rules out the very popular flat CMS's or static site generators out there today as well just about every other blog thing avaliable. Some really good examples of these are Jekyll, WinterSmith and for the Laravel fans, there is WardrobeCMS. I damn sure was not going to use Wordpress or some other similar monolithic CMS that does way more than what I need.

Core backend has to be PHP Since this is my primary language of choice, it would make sense for me to choose a different language really. But, I feel that I am still in the learning stages. I felt that if I did choose another language, such as Ruby or Python, it would take away from the experience too much. Not that I do not want to learn another language or have an interest to. I felt since my confidence level is still a little on the mid to low side with OOPHP, I owed it to myself to push forward with PHP then cut myself short and start all over with a different language that I might never use again. That is typically what seasoned programmers do and I are not one of those.

Has to support Markdown I wanted to be able to write my posts using Markdown. It's one of those syntaxes that when you learn it and get comfortable using it, you will want to write everything with it. Hell, I find myself writing notes to clients in Markdown all the time.

As little javascript as possible Again, not that I don't like Javascript. JS is awesome! I love love love AngularJS and have no issue with using it. Actually, using it would possible give the site better performance and offer the end user a better overall experience. But, going back to the point of using PHP, this is not and was never ment to be a "This is how to build a CMS" project. This is a simple project that will allow me to get more experience with backend and frontend development. Eventually, I will be working Angular into the project, so don't worry. Also, I do not want to have the head of each template loaded up with 15 link tags, pointing to a bunch of scripts or partials. I have GruntJS running a few tasks for SCSS right now, so I can leverage that later to help with concating and compressing any needed JS files at a later time.

Has to have syntax highlighting Enough said.

Could not use a CSS Framework and had to be responsive - I have used Foundation for several years and love it. Buuutt, I really only used the Grid portion of the framework. I can do CSS without too many problems. But positioning has been the single weakest point in my CSS skills. Hence I used the Foundation Grid for everything. No better way to get past that then push through building a responsive site from the ground up with my own CSS. Well, actually I am using SASS. I will warn you though, I totally suck at styling! That's why there are very few colors on the site. Picking and matching colors for me is about as painful as shaving with a dull and rusty razor.

Free at Last!

So, I'm finally at the point where I can use my new blog/homebrew cms or whatever you want to call it. It's not finished by any means, but working. It has been a very frustrating road, but a great learning experience! It is currently hosted on a free tier at OpenShift, without a domain name(I know!). And yes, I gave in and it's currently built with Laravel. I do plan on rewriting it with Phalcon, but that's another story for another time. I can make blog posts and for now, that's what counts. I have to finish the links at the top and add a comment system, so... I still have some work to do. Hopefully people will find the layout and information good enough that I might be able to at least keep up the same stats as I have on my blog over on Blogger (avg 1000 a month).

Oh and just in case you were wondering... Yes, syntax highlighting is working as well :