Mads Kristensen created BlogEngine.Net back in 2007. I have tested Dasblog, Wordpress and BlogEngine.Net and decided back in 2010 that BlogEngine was my blogging platform of choice. But now in 2014 when responsive design, JSON, HTML5, CSS3 is all well known and supported. I decided to migrate to a new and minimalistic blog platform. It is called MiniBlog and hosted on GitHub. I really like the project’s name and goal. It has less overhead and is really fast! It is based on bootstrap, so responsive by default.
So the requirements for me for my new blogging platform is:
- .Net C#
- Bootstrap theme(s)
- Lightweight
- Fast
- Live writer integration
- RSS feeds (to feed to feedburner)
- SEO friendly
- Mobile friendly
- Azure hosting support
Miniblog has it all. Because I am a lazy bastard programmer, I will call BlogEngine.Net BE and Miniblog MB. Here is how I moved from BE to MB:
1. Forked MB
So that I can contribute and give back to the community. And I can keep my own branch and have a local repository.
2. Moved App_Data posts
Copied all posts from BE to MB. But MB could not found my categories.
@JPHellemons Use the console app in my Blog Formatter project on github. It'll convert all your posts, links and categories
— Mads Kristensen (@mkristensen) January 13, 2014
3. Formatted BE data for MB
Cloned this formatter to my desktop and uncommented line 17 and commented out line 18 of program.cs and renamed the folder parameter to origin in order to get it to run.
4. Made a custom theme
I have just copied one of the existing theme’s and made adjustments to the CSS (and razor view) You really have all freedom with this blogging platform
5. Moved login credentials
The default login is demo, demo and is stored in your web.config. You can change it, but perhaps accidentally commit it to GitHub, so follow this guide to move it to a separate authentication.config and exclude it in your gitignore.
6. Google Analytics
A plain installation of MiniBlog does not include Google Analytics “integration”. So you manually have to add the tracking code in your custom theme (from step 4) It is a good time to move your old Analytics to the new “universal analytics”. Add the snippet before your </head> tag.
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXXXX-X'); ga('send', 'pageview');
7. Syntax highlighter
To make the code snippets more readable I use this javascript library to enable syntax highlighting. At first, I took the wrong javascript files from the zip. I found the solution on this post about xregexp not defined.
8. Custom pages
MB is by default just a blogging platform and does not have custom pages for about and/or contact. It is better to add them in the view folder, but then you might have to do some work for better routing, so I added an about.cshtml and contact.cshtml to the root of the project. You can reference the theme’s shared layout there to make it match the rest of the sites layout.
9. Social sharing
This is also related to point 4. It gives visitors the option to share your posts on social networks which can give you a better reach. You can use AddThis or something similar. Or use the official plugins from Facebook and Twitter but that includes more javascript and dom manipulations which cause more load on server and client side. Which gives you less points with Google’s Pagespeed. So I combined the url’s from Hanselman’s post and the icons from Flaticon with the “embed resource as base64” option from web essentials Visual Studio extension.
10. Ads
I included a small javascript reference from developer media (previously lake quincy media) to add some ads to the posts (to try to earn back the money for my hosting bill) and included it in my theme, but I am still looking for the best performing ad dimensions.
11. Url-rewrite
I am using this free extension of IIS to rewrite some url’s and have added this rule to include the www subdomain:
<rule name="Add WWW prefix" stopProcessing="true"><match url="(.*)" ignoreCase="true" /><conditions><add input="{HTTP_HOST}" pattern="^jphellemons\.nl$" /></conditions><action type="Redirect" url="http://www.jphellemons.nl/{R:0}" redirectType="Permanent" /></rule>MB has default rules to remove the www subdomain (which I disabled) and has a rule to remove the .aspx which BE has, to get cleaner url’s
Have I missed something? What changes did you make when moving to MiniBlog?