A New Web Site

This weekend, I finally updated my personal home page (it’s only been about 5 years…). The new site uses several technologies I wanted to play around with.

The site is served by GitHub Pages, though I don’t use their automatic page generator thingy. Instead, on my local machine, I have two checkouts of the repo side-by-side: “master” and “gh-pages”. The “master” contains the actual source code for the site, while the “gh-pages” contains the site itself. This setup is described by Chris Jacob in this Gist.

The site itself (technically) uses ASP.NET MVC and jQuery Mobile UI. Inspired by John Papa’s recent excellent blog series on single-page applications, my site is also an SPA, only it’s served statically, without any dynamic parts (yet). :)

To get the (dynamic) ASP.NET MVC converted to a (static) GitHub page, I run a publish script that captures the ASP.NET MVC output and writes it (along with its content files) to the “gh-pages” directory. This way, I get the full ASP.NET MVC support (including NuGet packages and C#) without having to execute it on the server.

As part of this web page, I developed my own C#-to-HTML formatter wrapped in an HTML helper. The C# formatter uses backticks (`) to surround type names, and a backtick command (`!) to surround highlighting. Both inline and block C# code segments are supported.

As soon as Azure Web Sites support .NET 4.5, I’ll wrap up the formatter into an actual WebAPI.