Home Creating a blog
Post
Cancel

Creating a blog

Let’s create a blog. How hard can it be? Everyone has blogs these days, why not make my own to contribute to society?

Let’s open up Google and start with the simple “How to make a blog”.

  • wix.com
  • wordpress.com
  • simplesite.com
  • theblogstarter.com
  • startbloggingonline.com - How to Start a Blog in 20 Minutes
  • howtostartablogonline.net - How To Start a Blog in 2018
  • websitesetup.org/start-a-blog
  • bloggingbasics101.com/how-do-i-start-a-blog

The list goes on and on and on and on! Three of those links from the Google search alone are simply adverts!

_config.yml

Good grief, we could be here forever! However, as a programmer that uses GitHub to host my website, GitHub is probably a good place to start. Googling “How to make a blog github” retrieves some wonderful results:

  • GitHub Pages - Websites for you and your projects…
  • GitHub - barryclark/jekyll-now: Build a Jekyll blog in minutes…
  • Getting Started with GitHub Pages
  • GitHub - HubPress/hubpress.io: A web application to build your blog…
  • How to create Jekyll blog using Github Pages - Tutorial 4 - YouTube
  • How to Create a Blog with Jekyll and GitHub Page

This is more like it! Given that I have had previous success with GitHub Pages, I click the top link, which goes to a page containing a link titled “Blogging with Jekyll”. I click that and see some complicated wiki page… nobody’s got time for that! The second link on Google takes me to the Jekyll Now GitHub repository, with the description “Build a Jekyll blog in minutes, without touching the command line.” Oh yeah, that sounds nice. Fork the project, nice and easy and we’re ready to go.

Or so I thought. I currently have my main GitHub pages website setup and didn’t want to override it with this blog. “I’ll just sort it out later, what could be so bad about it”. It works a charm. I setup the GitHub pages in the settings for the repository, it gives me the option to add a GitHub pages theme and it starts up flawlessly. Of course, until you click any of the links, which break. It so happens there’s a setting in the _config.yml file called baseurl which fixes it all for you and there we go, a lovely little blog.

I write my first blog post, Fast Learning - You Can Do It! and it’s all working perfectly. However, the theme just isn’t to my liking - it looks very different to my main website theme, so let’s try and mirror that to this blog site, shall we? On that Jekyll Now Github repo, there’s a section for Local Development.

  1. Install Jekyll and plug-ins in one fell swoop. gem install github-pages This mirrors the plug-ins used by GitHub Pages on your local machine including Jekyll, Sass, etc.

Ah. Easy peasy. I open up a command prompt (on Windows 10) and I am greeted with one of the most annoying error messages which I frequently encounter on a daily basis:

'gem' is not recognized as an internal or external command, operable program or batch file.

How helpful. Obviously, I need to install Ruby to use Ruby gems, why didn’t I think of that before I ran that command? I go and track down a Ruby installer and take a look at the list of downloadable files. There’s installers which include the devkit for Ruby and ones which don’t include the devkit for Ruby. “I don’t need a devkit, I’m just installing gems” I think to myself as I download the Ruby 2.5.1-1 (x64) file. “Of course I want the most up to date Ruby version, not some old 2.4.4-1 ‘recommended’ version”. After running the installer, some error message appears, but I ignore it.

Apparently, something just isn’t working when I run the gem install github-pages command again. Oh yes, I need to install MSYS2. I go to Some MSYS2 installer website, download the right .exe file and install MSYS2.

I run gem install github-pages again. Now it can’t find gem again. I open up powershell, git bash, command prompt… each terminal producing a different output when I run that same command, however none of them producing my desired output. Guess it’s time to start over again. I uninstall MSYS2. I uninstall Ruby. I delete the Ruby24-x64 folder from the C: drive. I return to the Ruby installer site. Maybe I need that devkit? I install the Ruby+Devkit 2.4.4-1 (x64) file and run the dreaded gem install github-pages command.

Finally! I make some progress! After viewing my local blog on my machine, I am able to write my posts, view the result and push them to my main site without having a series awkward commits of “fixing this typo” or “sorting out some dodgy formatting”.

Is worth spending 3 hours to create a blog? I guess so, I certainly enjoy the process of fixing errors, even if it’s slightly less programmy.

This post is licensed under CC BY 4.0 by the author.

-

Fast Learning - You Can Do It!