How I Faked a Blog

First I should clarify my terms. When I say that I faked a blog, what I mean to say is that I faked having a CMS (content management system) on my website (raagnair.com).

But why?

  1. I don’t want to host the posts/media that I upload
  2. I don’t want to ever worry about migration/backups
  3. I don’t want to pay for the bandwidth

TLDR:

I uploaded my posts/photos on my tumblr blog, then used JavaScript inside of a simple index.html file to load them, and synthetically mimic a “front page” along with individual “blog post” pages.

Background:

I blame it on ego, really. In my college databases class, my TA had a personal website hosted on WordPress, and somehow that offended me. In my over-eager college brain I thought: How can someone who, ostensibly, knows how to program, rely on the same medium of content management that the layman does?

Well, years later it came time for me to make my own website, and I ran into the issue of how to host a blog under the same domain name, without succumbing to the devil of WordPress.

Approach:

As it so happens, my friends at the time were avid fans of Tumblr. And with a bit of sniffing around I found out that Tumblr has a simple querying API that can be accessed via Ajax. No OAuth, no API key, just open fearless access to all of the internet.

After a little bit of playing around, I put together a website that:

  1. Queries my Tumblr blog for a handful of posts
  2. Grabs the first <img> from the post to use as the preview pic
  3. Presents these several posts, along with their titles, dates, and preview pic

Then, when the user clicks on any one of the previews, the URL parameter changes to indicate the specific blog ID. The JavaScript then queries my Tumblr blog for that blog ID and shows the full post body.

github.com/raagnair/tumblrsed

Shortcomings:

Barely any SEO to speak of. With my homepage online for a few months it struggled to index blog posts and attach meaningful captions to the few pages that it did capture. This is because none of these blog posts have static URLs, they are just URL params attached to the end of the index.html.

Formatting was a nightmare. Sure, the Tumblr v1 API lets me use a raw HTML editor to format my Tumblr posts, which means I somewhat control how they display on my website. But Tumblr is notorious for infecting posts with their custom nonsense, like figure tags I never wanted, and metadata all over the place. It was a nightmare writing posts on Tumblr, because if I ever clicked into the WYSIWYG editor by mistake, all of my custom HTML was instantly nuked.

Conclusion:

An impractical, albeit fun, excursion.

Leave a Reply

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

  1. Hello,

    We provide funding through our venture capital company to both start-up and existing companies either looking for funding for expansion or to accelerate growth in their company.
    We have a structured joint venture investment plan in which we are interested in an annual return on investment not more than 10% ROI. We are also currently structuring a convertible debt and loan financing of 3% interest repayable annually with no early repayment penalties.

    We would like to review your business plan or executive summary to understand a much better idea of your business and what you are looking to do, this will assist in determining the best possible investment structure we can pursue and discuss more extensively.

    I hope to hear back from you soon.

    Sincerely,

    Syed Atif
    Investment Director
    Devcorp International E.C.
    P.O Box 10236 Shop No. 305
    Flr 3 Manama Centre, Bahrain
    Email: syedatif1001@gmail.com
    Website: https://devcorpinternational.com

  2. হাই, আমি আপনার মূল্য জানতে চেয়েছিলাম.