Review of Miniblog.core

I've had a few attempts at setting-up a personal blog site using services like Google's Blogger, but haven't been particularly happy with the result. Therefore I decided to build my own – well I'm a software developer after all! Whilst searching GitHub for existing solutions to provide a starting point I found Miniblog.core by Mads Kristensen. He describes it as a personal blogging engine which means it implements a website from which you can create, manage and publish the postings of your own blog. After an evaluation I came to the conclusion that Miniblog would be a good match for me. In this blog post I will explain why. In my next post I explain how I built my site and published it on Azure.

Skills you need

In order to use Miniblog as the basis for your own blog site you will need to have basic skills in building ASP.NET WebApps using Visual Studio as well as some experience in deploying them to Azure. However, the technical bar isn't very high. Actually if you're just starting-out with this sort of technology then it's just the type of project you might want to undertake; you'll learn a lot by doing so. My next post takes you through the process step-by-step with few assumptions about your existing skills.

Documentation

The first thing you'll realise looking at the GitHub repo that provides a home for Miniblog is that there's not much by way of documentation. There's a readme file which contains a list of its basic features and instructions for installing a template so you can build it with Visual Studio, though take care as this doesn't give you the latest version. There's also a link to an example site built using Miniblog and published on Azure so you can explore its features for yourself.

Hosting requirements

Miniblog uses the ASP.NET Core framework (currently version 3.1) which means that it can be hosted by most modern servers including those running Linux with Apache as well those running Windows Server with IIS. You won’t need a database server as your blog posts are stored as XML files within wwwroot and user authentication is performed using a simple web.config file.

Hosting a Miniblog site in the Azure cloud made sense for me as I’ve already got a subscription with a S1 application service plan so I can host it with minimal further cost. In this way I avoid the hassle of administering my own server and can publish my website directly from Visual Studio with only a few clicks. Indeed, Miniblog is built with Azure deployment in mind.

Hosting on Azure might still be a good solution for people without an existing subscription as makes the deployment and running of your website very simple. However, a S1 application service plan isn’t cheap. I pay about $80 a month, but use the same plan for hosting multiple websites. You won’t find the costs reduce much when hosting just one WebApp.

You can host your site on an F1 plan which is free, but you’ll have to make do with a domain name like mysite12345.azurewebsites.net as well as suffer performance more suitable for development and testing. Upgrading to D1 will cost you about $10 a month and allows you to have a custom domain like www.willstott.org. However, D1 doesn’t support SSL so most browsers will warn people not to visit your site. You also don’t get any improvement in performance over a F1 plan and are subject to same sort of quotas for CPU usage.

People using a F1 plan can implement a custom domain name by using the portal provided by their domain name registrar to add a "URL Forward" DNS record to the website address created by Azure.

Code quality and support

Not surprisingly in a project headed by Mads Kristensen the design and implementation of Miniblog.core is elegant, light weight and simple. The GitHub repo currently lists 22 contributors to the project and whilst not being worked upon every month, there are regular updates. You shouldn’t expect a rapid response when raising an issue, but there is small community of active volunteers who may decide to help you.

... you don't need to have extensive experience in building ASP.NET Core WebApps to make good use of it

Architecture

Minicore is based on the ASP.NET Core Model View Controller (MVC) pattern so the data is held in the model classes, the processing of website requests happens in the controller classes, and there are various views which are responsible for presenting the HTML returned to the browser containing the data from the model. There are also some service classes. The most significant of these is FileBlogService which serves the BlogController by reading your blog files (XML and JPEG) into a cache of Post model objects which can then be found and returned for display in the various Blog views. For example, the following GetPosts() method returns a collection of Posts for display in the home page (index.cshtml)

public virtual IAsyncEnumerable<Post> GetPosts(int count, int skip=0)
{
    var isAdmin = this.IsAdmin();

    var posts = this.postsCache
       .Where(p => p.PubDate <= DateTime.UtcNow && (p.IsPublished || isAdmin))
       .Skip(skip)
       .Take(count)
       .ToAsyncEnumerable();

    return posts;
}

Conceptually there is not much more you need to know about the operation of Minicore than the above, so you don't need to have extensive experience in building ASP.NET Core WebApps to make good use of it. That said, there is a reasonable amount of Javacript and some CSS which might prove more challenging for those who want to make changes to the styling of their blog site.

Look and feel of the website

A brief look at the example site showed that Miniblog provided much of what I wanted. The website is responsive in that it looks equally good on a desktop browser as it does on a smartphone and there’s support for offline use with Service Worker. It has a very clean look with simple but stylish presentation of a blog posting that supports images, tables, lists as well as pull-outs and special sections for displaying code. There is also a provision for your readers to add their comments as well as to link the post to their social media accounts - Facebook, Twitter, and Google+.

Rather than attempting to describe the user interface in detail, I suggest you just try it for yourself whilst paying attention to the following features:

  • A menu item in the page footer provides access to the login form - username and password are both ‘demo’. Once logged-in you can create a new post, delete comments, or edit/delete an existing post. Miniblog supports only personal blog sites, so there is only one user.
  • Although the rich text editor (Tinymce library) allows you to compose a post directly, it’s easier to use Open Live Writer, or cut and paste from a Word document. The editor does allow you to applying styles for headings and so forth, as well as special typographic effects for elements like source code and pull-outs. It also allows you insert images and links with special support for embedding YouTube videos (see Miniblog documentation
  • Home page is reached by clicking the name of site in the header and contains a list of blog postings in date order each with its title, publication date, synopsis (excerpt) and a list of categories. Clicking on a category filters the list so it contains just the posts in that category, but you can’t filter by more than one category at a time. If there are more than a given number of posts (defaults to 4) then buttons appear so you can navigate between them.
  • You read a post by clicking on its title in the home page list which takes you to a specific page with its own URL (defined by the slug field). At the top of the page is its title, followed by its publication date and then the content. At the bottom is a section which allows people to provide their own comments; a feature described in more detail below.
  • At the bottom of each page is a block containing links to social media sites. This allows people reading your posts to provide links to them in their social media accounts. You should try this out as the integration is quite good, though I will suggest improvements in a future post.
  • Good support is provided for printing posts which produce well-presented physical  documents with the content adjusted for the given paper size.

Support for Reader's Comments

You can set the number of days for which comments are allowed after a post is published in the appsettings.json file, but you cannot specify the duration of comments for individual posts. There also isn’t a setting which allows you to block / unblock comments for the entire site; something which might be useful if you find your site being targeted by vandals.

The lack of email verification for people adding comments is possibly the biggest short-coming of Miniblog

Anonymous comments permitted

It is very easy for people to add comments as there is no requirement to register. They just give an email address which isn't verified, though the format is validated and if it is known to Gravatar the corresponding image appears. The lack of email verification for people adding comments is possibly the biggest short-coming of Miniblog. Website owners are responsible for what appears on their website, at least in the UK. Therefore allowing anonymous posting of comments isn't a good idea. There is also the issue of spam commenting, but that is just an annoyance as any links entered into comments are tagged ‘no follow’ so they have no impact on the webbots that do site ranking.

I intend to enhance my site at some stage to support multiple authenticated users with different roles. This would allow me to limit the submission of comments just to people who had registered. It might also allow me to permit others besides myself to add posts. However, I suspect it will prove easier to integrate Miniblog into an template WebApp with full authentication features than it will to add full authentication to Miniblog. Whatever route taken, it doesn’t seem like a trivial task.

Support for Google Ranking

Making your site friendly to webcrawlers (bots) like those employed by Google primarily involves including particular metadata in the headers of your HTML pages as well as providing certain standard files; specifically ‘robot.txt’ and ‘sitemap.xml’.

Your robot.txt file makes suggestions to bots about folders in your site that are unlikely to contain information worthy of indexing. It also gives them the location of your sitemap; a file which contains links to the pages they should index.

Miniblog uses methods in the RobotController class to dynamically create the required responses to requests for either of these files. This means you don’t have to update your sitemap after publishing a new post, or deleting an existing one. Similarly, information from the Post XML file is used to dynamically populate the metadata for the HTML page constructed in response to a bot’s request; see Views\Shared\_Layout and BlogController. This metadata includes elements to support the Facebook inspired Open Graph Protocol (og:url) as well as a similar protocol promoted by Twitter (twitter:url). They are both concerned with building social graphs in order to represent social relations between yourself and others.

Support for Atom, RSS and RSD

In addition to servicing requests from webcrawlers (bots) by the likes of Google and Facebook, Miniblog also provides support for news aggregators and feed readers by supporting protocols for Really Simple Syndication (RSS), Atom, and Really Simple Discovery (RSD). These sorts of protocols have been around for decades and though their popularity has declined somewhat since their heyday they have recently enjoyed a resurgence of interest due to the emergence of newer readers like Newsflow, Awasu and Feedly which aim to help people take better control of the information they receive.

Support for RSS, Atom and RSD is provided by methods in the RobotController class which respond to a request like www.willstott.org/feed/rss by returning an XML file containing information about each of your posts.

Import and Export of Posts - MetaWeblog API

Many blog providers like WordPress and Google Blogger support the MetaWeblog API which allows blog posts to be written, edited and deleted using XML Remote Process Calls (XML-RPC). Miniblog supports a subset of this API using the WilderMinds.MetaWeblog library by Shawn Widermuth. This allows you to use an editor like Open Live Writer to create and publish your blog posts. Furthermore you can use Windows Live Writer to connect to an existing post hosted by Wordpress and then import it to your Miniblog site, or vice versa.

Open Live Writer screenshot

Figure 1: Open Live Writer Screenshot

Open Live Writer is an open source desktop publishing application originally released by Microsoft as Windows Live Writer (discontinued in 2017).

Performance

Miniblog is a well-written and compact implementation of a blog engine, so its overall performance depends more on the platform upon which it is hosted than the code itself. I’m very happy with the performance of my blog, but that isn’t too surprising given that it’s hosted on Azure S1 service plan. If you elect to use the free F1 plan then expect delays in loading and wide variations in responsiveness.

The documentation on the MiniBlog GitHub site lists a number of tests that have been run for the example blogsite which show it is fast and compliant with key standards like accessibility, W3C HTML, RSS, OpenGraph. There is also support for content delivery networks (CDN) in terms of a CDN Tag Helper, though I haven’t implemented that feature for my own site yet. In addition when published on Azure the webjob Azure Image Optimizer is automatically installed in order to compress any image files contained in your posts.

What’s missing?

Miniblog provides most of what I wanted for my personal blogsite, but not everything. Some of these shortcomings are easy to fix and have been implemented in the first iteration of my site as will be described in a forthcoming blog. They include adding standard pages like Contact, About, Privacy, and T&C as well as providing support for Linked-In. They also include a number of fixes for minor bugs present in the version of Miniblog I cloned at 6 Sept 2020, such as the failure of navigation buttons to appear when there are too many posts to display in the list on your home page; see issue #262

Other shortcomings are more difficult to address so will have to await the second iteration of my site. These include:

  • Cookie law compliance: when you visit most commercial websites a banner appears asking you to consent to their use of cookies, but this is not provided out of the box by Miniblog. That said, it could be argued that this law doesn’t really apply to personal websites and that nobody reads such banners anyway.
  • Comments:  I would like to restrict the making of comments to people who have registered with my blog, but Miniblog is designed to support just one authenticated user, as mentioned above
  • Multi-level hierarchy: I would like to add a bread crumb trail to the top of my page so people can see where the current post sits in a multi-level hierarchy of posts, not just what’s its category. For example, rather than saying this post is in the Miniblog category it would be more helpful to show that it is in the technical, development, ASP.NET Core, Miniblog section. Building on this idea it would be useful to provide a dynamic multi-level menu reflecting  such a hierarchy as well as more meaningful URLs like https://www.willstott.org/blog/tech/dev/aspnetcore/miniblog/review
  • Search: I would like to provide a search bar which allows people to search for posts containing given words and phrases.
  • Social Media Images: People can post a link to a particular blog post in their social media accounts as previously discussed, but I would like such a link to use an image appropriate to the post instead of always using the same one. Ideally, I would also like this image to appear as a banner at top of the post.
  • Reporting features: Miniblog doesn’t provide any reports, so you will have to implement your own metric gathering as well as a mechanism (i.e. Azure webjob/webfunction) to provide periodic analysis and reporting of things like post popularity and number of comments added.

Summary

I like the design of Miniblog and was delighted that it provided much of what I was looking for in a personal blog engine. It presents my posts elegantly and provides styling for code and pull-outs as well as other types of elements like tables, images, and YouTube videos. It also gives me full control over the implementation and hosting of my site so I can incrementally add new features and ramp-up the performance as needed. There are a few things missing, but nothing really important apart from email verification before allowing people to add their comments.

References

Please let me know if you find any interesting material about Miniblog so I can add the link to this list.

You might find the following posts interesting:

 


If you found this post useful please help raise my profile by providing a link on your social media account; just click the buttons below. You can also add a comment or contact me by email, but I can’t promise to respond immediately. 

Comments

Cleo Andari

Some really wonderful posts on this web site, regards for contribution please visit us at <a href="https://rebrand.ly/4sia5lt" rel="nofollow">ASIASLOT777</a>

Cleo Andari

Sean Mason

I love using miniblogs. I have a bunch of SaaS tools that I use on them to create content fast: <a href="https://ltddeal.com">LTD DEAL</a>

Sean Mason

Mikel Jackson

Thank for share a good information. <a href="https://soccertoday.co/">SoccerToday</a>

Mikel Jackson

Interedwise Education

Thanks for the complete information about the mini blog

Interedwise Education

Interedwise Education

Thanks for the complete information about the mini blog

Interedwise Education

And Interiors

Thanks for the complete information about the mini blog

And Interiors

And Interiors

Thanks for the complete information about the miniblog

And Interiors

SNR Associates

Thanks for an excellent information about the mini blog

SNR Associates

Korners Of India

Thanks for an excellent information about the mini blog

Korners Of India

Authentic Porta

Thanks for an excellent information about the useful details

Authentic Porta

Post a comment