The start of my blog
So this is my first post. This particular post is about me actually creating this blog. I have done some HTML/CSS/JS before, but not really been able to use it in anger, so to speak. I have wanted to make a website of my own for some time (I even bought a domain, markhughes.eu, so long ago that I can't even remember where I registered it), but never really knew what to do with one, so I put it off, until I thought about writing a blog. I am no expert in any particular field, and I'm fairly new in the Software Engineering industry, so I doubt I'd write any tutorials better, more accurately, or simpler than has already been done, so I decided that instead of being that sort of blog, I'd document my experiences as I learn new things, or try my hand at whatever project takes my fancy at a given time. Today's little project is this site itself. Before I can write blog posts, I have to make my blog page, obviously, so how do I do that? I could use wordpress, which I hear lots of good things about, but that handles most of everything for you, and the point of this is for me to hone my coding skills, so I wanted something else. After a quick google, I found that several people use a thing called Jekyll with Github pages. Being a fan of github, and I had already had a go at making a page on Github (I made a couple of pages with little content, before I realised I didn't know what I wanted my page to be about), so figured it'd be a good start. First step. Find a good tutorial.
One of the first links I found, https://www.smashingmagazine.com/2014/08/build-blog-jekyll-github-pages/, looked like a great place to start. It explains clearly what Jekyll is and how it works with GH, discusses the advantages of using Jekyll over Wordpress (It agrees that I made the right choice, confirming that I am in fact, a genius. ), so I got stuck in. The first thing this tutorial tells me to do is clone a ready made repo. Kind of cheating, but ok, we'll see where this goes. So I forked his repo, renamed it to be mine in my own github account (It tells me in the project homepage that you cloned it from another repo, reminding me of what a fraud I am), and my page was live. Still following the tutorial, I edited the _config.yml file and changed bits where the author's name was and put my own. When I got this far I decided I wasn't happy, because my site folder was full of files and code I hadn't looked at or gained any real understanding of, so I deleted the project from my laptop, and from Github, and set about looking for another tutorial.
This is where I hit the jackpot. https://www.taniarascia.com/make-a-static-website-with-jekyll/ This page teaches you how to create a Jekyll site from scratch, and explains what each file is for, so I followed it, for now I've kept all the styling as the author has it, because it's getting late and for now I just wanted to get this page to a good starting point that I can build on and improve in my own time, writing new posts as I go along. Another helpful thing this tutorial did is explain how to serve the site to localhost, to test it locally before committing and pushing changes to Github. When I had my site ready to go, I pushed my changes up, and went to the homepage address. I was disappointed to find that the styling wasn't working, despite it working perfectly on localhost. After a bit of digging and looking around the code, I found that the baseurl was set in the config (but not the config_dev) to be "/markphughes17" so that all the relative URLs were incorrect on the site. A schoolboy error, I'm sure it won't be my last. So now I have a site up and running that I can write posts to, and I have done what I set out to do, which is to get my new site up and running, and to write my first post. It doesn't look great right now, but this is the starting point. As Borat would say, great success!