Integrate blog engine into existing site

So I got BlogEngine.NET running on my personal tech blog (this site) and I want to add a simple news feed to my corporate site to announce various happenings and job openings. Wouldn’t it be great if I could just create a dedicated news blog here and then just display the posts on my company page? As it happens blogengine has a metaweblog api, this is the api that you can use with Windows Live Writer to manage your posts.

The API isn’t exactly a modern RESTful service as one could wish for, so I’ve put together a simple c# lib to extract posts. I’ve released it as open source and you can get it from github here. Bear in mind that it’s as minimal as I need it to be, feel free to contribute and send me a pull request. The client interface only exposes two methods for now:
public interface IMetaWeblogClient
{
    Task GetPostAsync(string postId);
    Task<IEnumerable> GetRecentPostsAsync(int numberOfPosts);
}
There are some guides on how to install the engine to a subdirectory (and keeping the styling separate) or merging the engine with your existing site. I don’t really know why you would like to do that unless you’d want to base your entire site on the blog engine. My way separates writing/publishing news completely from how the posts are presented on the company site, which I think many others are interested in as well. So here’s the lib in action from the test client which also is available on github:

metaweblogclient

works like a charm. Now I just need to integrate it into my company site and style it.
Hope somebody else finds it useful as well!
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *