Of late, I’ve felt the need to document things that I come across, that might have code samples in them. I also like the idea of typing things out on a text editor, instead of a web browser.

Jekyll seems like the right tool for this job. So I’m going to try it for a while.

So how did I start with Jekyll? I stated here. This is Github’s documentation for setting up and hosting static pages on github.

I created this repository, and cloned it on to my local machine.

  $ git clone git@github.com:goose42/goose42.github.io.git

(Sidenote: Doesn’t this sample look so much better that it would on wordpress?)

Once I had the repository, I installed and configured Jekyll. (I already am running ruby 2.3.0)

  $ gem install jekyll
  $ jekyll new . --force # --force, because the folder wasn't empty.
  $ jekyll serve

Now, when I navigated to http://localhost:4000 on a browser, I was able to see the sample website that is created by Jekyll. The navigation is pretty straight forward and editing the _config.yml file in the application root directory, as well as the .markdown(:heart_eyes:) file in the _posts directory, I was able to create this post.

The jekyll serve command runs a server that is able to reload when ever I save changes to any markdown file, and if I simply refresh my browser tab, I am able to see the updated version of the post.

Now, I would like to publish this post, so I simply commit my changes my git repository and push them out to github. (I thought I had to build the pages with jekyll build, but I did not need to. Perhaps I need to find out exactly exactly what that does.)

  $ git add _posts/2016-03-10-starting-jekyll.markdown
  $ git commit -am "My first post"
  $ git push

This should have published my changes to github, and I should be able to see this post on live

Now that this was set up, I wanted to change the landing page to be an “about” section, and separately link to the actual blog. The details of this change can be tracked here. The short gist of it is, that I changed the layout attribute on the index page to be what was originally the about page, and created a blog.md file that would hold what was originally the index.html file.

Seems pretty straightforward so far. Maybe this could do well with themes? Maybe I could make my own theme. Will probably update this post as I have more information.