In the past, I’ve always used WordPress for blogging. At first, I used a blog account hosted at wordpress.com before migrating it to a WordPress-instance in my Azure MSDN subscription. As you might know I’ve blogged at blog.powershell.no for many years, but on March 4th 2014 I was honored to join PowerShell Magazine as a contributing editor. Due to that, my PowerShell related articles was being published there going forward. However, I still need a place to post more personal content such as conference slides & other more personal information. Back then I decided to continue to use blog.powershell.no for that purpose. For a long time I’ve been thinking about brushing up the design that site, but as I’ve learned more about GitHub Pages and the simplicity it provides over a full Content Management System such as WordPress – I’ve decided to go that route. GitHub Pages is a static site hosting service, which means no server-side code such as PHP or any data stored in database services such as MySQL.
Getting started is very easy, as explained on the GitHub Pages website:
1. Create a repository: Head over to GitHub and create a new repository named username.github.io, where username is your username (or organization name) on GitHub.
2. Clone the repository: Go to the folder where you want to store your project, and clone the new repository:
git clone https://github.com/username/username.github.io
3. Hello World: Enter the project folder and add an index.html file:
4. Push it
Add, commit, and push your changes:
$git add –all
~$git commit -m “Initial commit”
~$git push -u origin master
5. …and you’re done!
Fire up a browser and go to http://username.github.io.
This means you can publish plain HTML-pages to a GitHub repository, and GitHub Pages will make them available as a website. Very simple. But that’s not all, it provides far more feature with the tight integration with Jekyll:
GitHub Pages is deeply integrated with Jekyll, a popular static site generator designed for blogging and software documentation, but used for much more. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers advanced templating >features, the option to quickly create a new Jekyll site with the Jekyll Theme Chooser, and Jekyll theme support.
The main advantages of Jekyll are:
-You can use Markdown instead of HTML. Markdown is simpler to read and write.
-You can add a Jekyll theme to your site without copying CSS files.
-You can quickly create a new site using the Jekyll Theme Chooser.
-You can use common templates, such as headers and footers, that are shared across files.
-You can use a simplified build process to build your site with GitHub Pages.
As I’ve been using Git and GitHub more and more over the past years, I’ve also learned how easy it is to work with Markdown. This means I can simply use the Markdown editor of my choice, write posts in Markdown (.md files) and push them to a GitHub repository. I’m using Visual Studio Code for this, due to the excellent support both for Git and Markdown.
I have decided to leave blog.powershell.no as-is so that existing articles will still be available, and start off fresh with www.powershell.no as the URL for the new site built on GitHub Pages. In addition to publishing announcements and conference notes as I did for the past few years on blog.powershell.no, I plan to do some technical articles as well. I often work with topics in my day-job I plan to write about, but don’t find time for. I`ll try to be better at getting short articles covering such topics here. Longer articles with more in-depth content will be published on PowerShell Magazine as usual.