blogging edit

A little while back, I wrote about how I moved my blog on to Azure Websites.
At the time, I was still running my website off of the custom blog engine I wrote a few years ago, Veritas.
I’ve actually been running off of my own, home built, engine for longer than that but at that point decided to rewrite, clean up, and open source it. Well, recently, I’ve been thinking about where to go with my website. I want to keep blogging, but I don’t want to deal with the effort that comes with running it off of a blog engine that no one else is working on / maintaining and if anything breaks, I need to dive back into how it works in order to fix it. I haven’t actually run into very many issues over the past few years but it’s just not something I want to have to worry about.

WordPress

Now a year ago, I reached out to friends in the community to ask what they recommended I use for a new blog. I received all manner of suggestions for things like WordPress, SquareSoft, Ghost, and more. After looking into many options, I had decided to use WordPress. Whatever option I went with, I wanted to be able to host it on Azure. Azure supports super simple deployment of a WordPress web app in Azure as well as a way to deploy a very scalable WordPress app into Azure, but there were a couple of issues I had to deal with in order to use WordPress.

The first is that WordPress is written in PHP. This isn’t, and wasn’t, a huge show stopper. My PHP skills aren’t the most amazing right now, but I could work my way through any code changes I might want to make. So, while I would prefer an ASP.NET solution because I have a lot more experience with programming that, I could deal with PHP. The second issue is WordPress’ reliance on MySQL. Azure’s MySQL solution relies upon ClearDB. This is fine and works well, but I don’t like not having as much control over things and ClearDB is, in my mind, a little too pricey (note that since I set up that blog, ClearDB did create a new database tier named Titan which is priced better for the size you can use.

At the time, I ended up setting up a Virtual Machine running a MySQL server which I could use for my WordPress site. This worked out very well and went very smoothly. Azure supports a lot of great backup options for the disk used for the VM so I quickly had backups of the disk with my MySQL server and DBs on it. Additionally, I installed a WordPress plugin which did daily backups of both the site files and the DB. However, at the end of the day, I’m not a database administrator. I’m also not someone that knows all about DevOps and can handle any issues that might arise when it comes to a Virtual Machine. When you add that into the issues I already had with WordPress, I knew that using WordPress would work briefly but wasn’t a long term solution. More so, when I decided to move away from Veritas, I knew WordPress wasn’t the right solution.

Jekyll

One of the suggestions back when I originally asked, was Jekyll. Jekyll is a static site generator that makes it very simple to create a blog. Essentially, it takes a collection of HTML, CSS, JS, Markdown, and other files, and converts them into a static site. Static means that at the end of the day you have a dump of html content that can be served up without relying on a backend server for processing. So there’s no PHP or ASP.NET code behind. There is no server side logic. It’s just HTML all the way down (ok, with CSS and JS files as well). The advantages to this are many including that the site can be hosted from anywhere or anything that can serve up HTML content and that it’s very quick because there isn’t any server side processing (outside serving up those files).

GitHub Pages

One of the very cool things about Jekyll is that GitHub supports a very easy way to host a website from a repo. Essentially, you check in the same files you’d run against Jekyll locally into your GitHub repo, and GitHub will automatically run Jekyll on it to produce the static website. This can be done for both an org (using a .github.io repo) as well as projects (by checking into a **gh-pages** repo). This means that even if you don't have a hosting account somewhere or want to deploy into a cloud, you can host a website in GitHub pages. Even more so, you can easily apply a custom domain to your GitHub pages website. What this all means is that with very little work, someone can host a website, with a custom domain, with no database dependency, on GitHub. If you know who [Phil Haack](http://haacked.com/about/) is, you may know about how he [moved his website to GitHub pages](http://haacked.com/archive/2013/12/02/dr-jekyll-and-mr-haack/) about a year and a half ago. Reading through one of his most [recent posts about 404 pages and redirects](http://haacked.com/archive/2015/07/28/github-pages-redirect-handling/) with GitHub pages reminded me of that at what would be the most opportune time. I had recently had some issues with my WordPress site and wanted to move that to something else, and had been considering the same thing or my personal site.

Moving to Jekyll

Moving to Jekyll consisted of four steps: * Picking a theme * Converting my current content to be “Jekyllized” * Fixing any misc issues * Uploading the site to GitHub and redirecting the DNS records

As it turned out, none of this took more than a few evenings time. Picking a theme was arguably the hardest part and I ended up primarily using dbtek’s dbyll theme combined with a few elements from the greyshade theme that Phil Haack used. I did have to make a few additional modifications to support things like Google Ads and the menu structure I wanted and blog entry headers I wanted, but those were pretty easy things to do. When Phil moved his blog from Subtext to Jekyll, he built a small program which connected to his database, pulled out the content, used Pandoc to convert the HTML content to markdown, and saved those files locally. This generated a markdown file for each blog entry which Jekyll could then be run against to create the static site. In my case, I couldn’t use his exact program since my Veritas blog engine’s databse design didn’t match up with Subtexts. So I wrote something simlar using Node.JS and the MSSQL module to connect to my DB. I tested with Pandoc but I ran into an issue with the alignment of images not being respected. It is possible to create markdown with img tags that have alignment, but it doesn’t work with Pandoc (as far as I’m aware). Fortunately, Jekyll works with markdown AND HTML. So I didn’t need to convert all of my entries to markdown but could sae them as HTML files. So, instead of converting the files, I mearly saved each entry as an HTML file with the appropriate Front Matter in each file.

Once that was done, there were only a few minor issues to deal with. Most things had to do with mixing the two themes I liked together. One of the advantages of moving from my own engine to Jekyll (or anything else) was that instead of building out my own design that was responsive and supported mobile viewing, I would just use one someone else had already made. Most of this worked fine though I did have to make a few minor modifications to ensure things looked the way I wanted. Outside of that, the only other issue I had to deal with was that early on, the image and linked content I had was automatically put into a directory within my site (by Windows Live Writer). I knew this would be an issue early on and had planned to move all of those files up to Azure Blog Storage where I started hosting all of my files a while back. However, it ended up being much easier to just dump the files into the same directory path within the site. I’m hoping to still move those files but this will work for now.

Lastly, I needed to push the files up. This was as easy as adding all of the files, commiting them, and pushing them to GitHub. After that, I needed to drop a CNAME file into to the root folder to point to chrisrisner.com. Then with some simple DNS changes at my registrar (I added A records since my registrar doesn’t support the ALIAS record that GitHub prefers and suggests). Oddly, when I moved over my WordPress site, it took the full day for my requests to get to the GitHub site. When I moved ChrisRisner.com over, it instantly started going to GitHub.

What’s Next?

I just made this change and it has worked out well so far. We’ll see within a few weeks if things are still working out well. I’m going to leave the previous, Veritas powered, site up and running on Azure just in case I decide to switch back over. Provided I don’t do that, I’m planning to actually deploy the same Jekyll powered site on Azure and then potentially using Traffic Manager to sacle across both Azure and GitHub, and maybe across some geographical regions as well.

blogging edit

For the third year in a row, I’d like to take a look back at the last year and reflect on a few of the things that happened as well as go over some stats from my site:

 

Highlights of 2014

It really seems hard to top 2012, but 2014 had some pretty great moments:

  • January Nothing exciting.
  • February Did some travel for work (Atlanta) and trained for a 12k (I’d fallen out of running so this was hard).
  • March Visited numerous places in Europe (Amsterdam, Paris, Epernay, Versailles, Bruges) and ran the Hot Chocolate 12k.
  • April Spoke at Build in San Francisco as well as helped with the keynote.  Oh yeah, and I was ON STAGE for part of the keynote.  Also had my second anniversary at Microsoft.  Also sold our old boat and bought a new (to us) boat.
  • May Did a lot of travel for work (Orlando, Houston, Boston) and a bit for fun (Whidbey Island)
  • June Had some friends visit.
  • July Took a cruise to Alaska.  Very scenic trip though I think it turned me off from cruise ships.
  • August More work travel (Columbus, Wisconsin Dells, Denver)
  • September Turned 31, went to Arizona for a wedding.
  • October Nothing exciting.
  • November Helped with the keynote at the NYC Connect event (where we announced the cross-platform build engine for Visual Studio Online), Boston, and San Francisco for work.
  • December Took a few days to go to Hawaii for Xmas.  It rained heavily.

Top 3 Blog Posts

By looking at unique view count, these were the top three blog posts in 2014:

Not a single one of those was actually from 2014. 

Top Azure Post

The top Azure related post was Authentication with Azure Mobile Services.  One of the focuses of this article was how to do custom authentication with Mobile Services which continues to be a popular topic. 

The Visitors

Here are the stats on the people that visited the site:

  • Unique Visitors:  This time around there were 222k unique visitors on the site.  That’s nearly 100k more than last year. 
  • Visits:  328k visits.  That’s over 130k more than last year.
  • Page Views: 601k page views.  Nearly 190k more than last year.
  • Location and Language:  The US led with 23% of the visits, followed by Indian (18.62%) and then the UK (4.43%).  English was again the language of choice. 
  • Browser and OS:  Chrome led with 56.61%, then Safari at 21.18%, Firefox at 15.54%, and IE at 4.41%.  Compared with last year, Chrome was up, Safari was up, Firefox was down, and IE was down.  For OS, OS X was at 47.85%, Windows at 41.62%, iOS at 4.23%, Linux at 3.59%, and Android at 2.4%.  This was a decrease for Windows, an increase for OS X, decrease for iOS, decrease for Linux, and increase for Android.  Windows Phone was at 0.14% and Chrome OS at 0.03%.
  • Mobile:  Mobile traffic was at 4.59% for mobile and 2.64% for tablet for a total of 7.23% which was just about the same as last year.  iPad led with 29.51%, then iPhone at 28.52%, then “not set” at 12.22%, then Nexus 5(2.14%), Nexus 7 (1.81%), and the Galaxy S3 (1.22%). 
  • Where you came from:  Overwhelmingly people came from search (86.6%), then Direct (9.7%), then searches.

This was a big increase over last year despite not really adding that much content.  There were only 23 new entries with a decent percentage of them being mostly puff (non-technical content or recaps of conferences).

Fitibit Stats

For sake of being able to hopefully compare last year against this year, I’m going to include some stats from the wrap up email I received from Fitbit.

  • Total Distance:  1847 miles
  • Total Steps Taken:  3,934,007
  • Most Active Month: July
  • Most Active Day:  January 25th
  • Least Active Day: December 27th
  • Weight Difference:  I’d rather not say…

What’s ahead in 2015

I’ve got a number of things planned for the next year:

  • Get back to blogging a bit more with at least 50 posts here as well as at least 10 posts on my other blog about sailing.
  • Release an actual app or game into a marketplace (Google Play, iOS App Store, Win App Store, etc).
  • Double the miles I went last year (so 3694).
  • Do some more travel (hoping for a fall trip to the UK).

I’ll report back in 2016 and let you know how it went.