Blog moved to MiniBlog

My most recent blogging platform was WordPress hosted on Azure.  This
has worked well for me, but there were a number of issues using this
platform.

  1. I do not like know PHP.  This made it very hard to make
    customisations.  I could usually work out what files to change, but it was cumbersome.
  2. I found the whole platform to be a little big and clunky for
    my needs.

Enter MiniBlog by Mads Kristensen…  See what Mads has to say about
MiniBlog on the Github
page
:

7 years have passed since I started the BlogEngine.NET project. It was using cutting edge technology for its time and quickly became the most popular blogging platform using ASP.NET.

The MiniBlog was born as a test to see what a modern blog engine could look like today with the latest ASP.NET and HTML 5 technologies. Just like with BlogEngine.NET, the goal was to see how small and simple such a blog engine could be.

This is the result.

Migration from WordPress

Mads has also very helpfully supplied a tool to help with the transfer
of blogs into MiniBlog,
MiniBlogFormatter.  It is rough and ready, but currently supports BlogEngine.Net, DasBlog
and WordPress.

I furthered the WordPress support by adding the following features into
my own fork of the repo:
https://github.com/gregpakes/MiniBlogFormatter.  I added the following
features:

  • Download images found in posts and save them to disk, altering the URL to point to the new location.
  • Support gists in the format [gist id=xxxxx].  These will now be converted into the normal gist script tags.
  • Implemented permalink remapping.  This is taken from http://www.colinsalmcorner.com/post/colins-alm-corner--updated-blog-engine.  This also requires some changes to the MiniBlog engine itself which is discussed later.

All the code above can be found on my GitHub fork:
https://github.com/gregpakes/MiniBlogFormatter.

Permalink mapping

One of the biggest issues to overcome was regarding links to my previous
blog.  I did not want to lose these.  Fortunately, Colin from
http://www.colinsalmcorner.com/ had already come up with a solution
for this.  You can read more about it there.  However, I did have a
remaining issue.  Colin had setup his OldPostHandler.ashx to point to
*.htm files.  My posts did not have an extension and were only pointing to directories.  For example:
www.gregpakes.co.uk/2013/11/my-dell-xps-15-2013-review/

I managed to get around this problem by adding a new rewrite rule to the
existing rules in the web.config.

<rule name="WordpressRewrite" stopProcessing="true">  
  <match url="^([\d]{4}/[\d]{2}/.*)/" ignoreCase="true"/>
  <action type="Rewrite" redirectType="Permanent" url="oldpost.ashx?request={R:1}"/>
</rule>  

This also relies on a slightly different handler mapping of:

<remove name="OldPostHandler"/>  
<add name="OldPostHandler" verb="GET" type="OldPostHandler" path="/oldpost.ashx" />  

The rewrite rule simply looks for URLs in the format /XXXX/XX/Title/
where X is a number.  I chose this format as this is the format all my
posts had.  I do not know if this is standard for WordPress, but it was
for me.

Other changes to MiniBlog

I also included
SyntaxHighlighter into the themes.  This is very self-explanatory and can be found in the
GitHub repository: https://github.com/gregpakes/MiniBlogFormatter.

Conclusion

I am excited to finally have a blog format that I can tweak and fiddle
with.  I really like the clean output and speed of MiniBlog.  Thanks
very much Mads.