I do use Blogger as my blog engine and really like it. Right, as soon as you create your blog posts in HTML and do not use embedded editor it is perfectly fine! So, when I do new post I create a plain HTML in VS and after it is ready I copy paste it to blogspot and publish. Original HTML I commit special repository on github.
It is no problem to do that, and I implemented a small script that performs exactly what I needed. I called this project GithubToBlogspot. Its description:
GithubToBlogspot is used for people who stores they blog article sources in HTML. Instead copy pasting HTML between blogspot and github, it should be possible to paste a simple script on a page and that script would load a content.
First draft example looks like this,
<div id="content1" class="load" >
Loading your content, please wait...
<img src="http://www.sanbaldo.com/wordpress/wp-content/mozilla_giallo.gif" />
var __user = "alexbeletsky"; var __repo = "Blog"; var __sha = "16fe3ddf21925508490d91978cf581a13bc37b6c";
var __path = "07112010/GitHubSocialCoding.htm";
var __div = "content1";
githubToBlogspot(__user, __repo, __path, __sha, __div);
* This source code was highlighted with Source Code Highlighter.
Code itself is also really simple: it opens the blob, reads its data as HTML, extracts the body and put body to target div. That’s it. All this done asynchronously, so as you open the blog you see progress image.. after data loaded it appears on screen.
But I haven’t taken into account several major considerations:
I still want to accomplish this. I was thinking about different solutions, but have no solid one.. Do you know is it possible to accomplish something similar with no drawbacks I mentioned above. It would be great if you share you ideas!