24 December 2014 Wordpress, GitHub Pages, GitHub Robert Muehsig

The year 2014 was a big year for the German & English Code Inside Blog - as you might already know, because you are reading these lines, we are now finally completely on GitHub Pages.

But to summarize it, here are the main parts:

Pre-2014 World

We started this Blog in German 2007 with a simple Wordpress Installation. In 2008 we begun to write Blogposts in English, but the main blog was still the German Blog. During the last years a good friend, Antje Killian, helped me and Oliver to translate the German articles and publish them on the English Blog.

March 2014 Custom VM to Azure VM

I always wanted to move the Blogs from our small Hoster to Azure, because I can spend there 115 Euro per month (MSDN Subscription, yeah!) and I wasn’t very happy about the Hosting contract. So we moved to Azure.

September 2014 Wordpress to Jekyll Migration for the German Blog

Until September 2014 our main “blog” language was still German. I decided to Blog now only in English and we converted the German-Blogposts to Markdown and moved to GitHub.

These Blogposts cover the Wordpress to Jekyll Migration and the reasons for our language switch:

December 2014 Wordpress to Jekyll Migration for the English Blog

The last weeks I converted the English Blogposts to Markdown, uploaded it to GitHub and did some enhancements to our Jekyll Installation. We now have a multi-language “Blog-Installation” on GitHub Pages.

We now have two archives, in English and German. The feed will now only list English posts, but our goal is to keep English as the main language.

All URLs should still be valid

I really hate it when content disappears, so I tried my best to keep all URLs working (= with a redirect to the new environment). In this Blogpost I showed the web.config with the URL Rewrite rules. Now, this is the current URL-Rewrite Section on the (still running) Azure VM, that will redirect everything to this GitHub Pages installation:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />
                <rule name="code-inside.de blog-in" stopProcessing="true">
                    <match url="blog\-in(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{HTTP_HOST}" pattern="code-inside.de" />
                    </conditions>
                    <action type="Redirect" url="http://blogin.codeinside.eu{R:1}" redirectType="Permanent" />
                </rule>
                <rule name="code-inside.de blog" stopProcessing="true">
                    <match url="blog(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{HTTP_HOST}" pattern="code-inside.de" />
                    </conditions>
                    <action type="Redirect" url="http://blog.codeinside.eu{R:1}" redirectType="Permanent" />
                </rule>
                <rule name="code-inside.de files" stopProcessing="true">
                    <match url="files(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{HTTP_HOST}" pattern="code-inside.de" />
                    </conditions>
                    <action type="Redirect" url="http://cdn.codeinside.eu/files{R:1}" redirectType="Permanent" />
                </rule>
				<rule name="blogin.codeinside.eu to GitHub" stopProcessing="true">
				    <match url="(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{HTTP_HOST}" pattern="blogin.codeinside.eu" />
                    </conditions>
                    <action type="Redirect" url="http://blog.codeinside.eu/{R:1}" redirectType="Permanent" />
                </rule>
                <rule name="catch all" stopProcessing="true">
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="http://www.codeinside.eu" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

If you found any issues, please let us know.

Hope this helps and happy Christmas!


Written by Robert Muehsig

Software Developer - from Dresden, Germany, now living & working in Switzerland. Microsoft MVP & Web Geek.
Other Projects: KnowYourStack.com | ExpensiveMeeting | EinKofferVollerReisen.de

If you like the content and want to support me you could buy me a beer or a coffee via Litecoin or Bitcoin - thanks for reading!