Jekyll Blog

10 Aug 2015

Software Versioning

One thing that is getting quite obvious the more you spend time observing the world we live in and in particular the networking industry is this: You'll need, in the future, at a minimum, to understand code. You'll also need to be able to work with the tools that are common to all coders.

While I have not coded anything close to production ready in many years (if ever), I have scripted a few things and modified a few things to make it useful for me. That's all I have needed so far and I think that will carry me far enough for a little while. What I haven't done, before now, was look into software versioning and revision control software, something that every coder out there uses.

While it is nice to read about how GIT works and how wonderful it can be, it is much easier to get a sense of what it does by actually using it.

Jekyll?

Jekyll is a static site generator that is built in Ruby, that actually works right in GitHub. Essentially, you can create yourself a repository on Github named YOUR-USERNAME.gitbhub.io, push your Jekyll source of the site to it and Github will generate a site at that URL for you. As the quick start guide of Jekyll shows, to have a site working on Github, all you need is this:

  • Create above repository
  • Install Jekyll (with dependencies of course)
  • Generate a site:

        jekyll new
    
  • Make modifications as you wish

  • Render this new site

        jekyll build
    
  • Initialize GIT

        git init
    
  • Add the folder to the local repository:

        git add --all
    
  • Commit changes as needed

        git commit
    
  • Set URL for the push:

        git remote set-url https://github.com/YOUR-USERNAME/YOUR-USERNAME.github.io
    
  • Push to Github

        git push origin master
    

This will set you up with a basically blank site. The beauty of it is in the details. You can now test your site locally using Jekyll:

        jekyll serve

Browse to 127.0.0.1:4000 and boom, your new site.

Want to write a new post? Create a new markdown file under the _posts folder called year-month-day-Your-Title.md and start writing in pure markdown (there is a little header to include there but you can look that up, pretty simple.)

There are bunch of themes that are super simple to edit and make your own (as long as you have basic HTML skills and know what CSS files are.) Of course you can always do better and will probably stumble on a few things, but that's the beauty of it isn't it (and remember, if you do this right, you have used version control and you can always roll back...)

The simplicity of the workflow from there is almost magic. Writing this post and post it to the blog was beyond easy. I actually deploy to my own web space and used the github space as a placeholder to test things out, although it works perfectly fine. I just have this web space for a number of other uses, so might as well use it. To deploy to be my own webspace I use this gem called glynn

Credits

Now I would be lying if I said I go the idea of using Jekyll from the ether... Credit, where credit is due:

Also credit to:

Published on 10 Aug 2015 Find me on Twitter!