1. Tumblr JS API

    The reason I chose Tumblr as my platform for a blog is because I had read it was easy to embed on your website.

    Unlike lots of other blogging platforms (blogger and wordpress being the two that come to mind first) you don’t need to make a subdomain on your website and it doesn’t try to force your page to look like it’s own platform.

    As for embedding the blog on my website the Tumblr JS API did actually make it almost as easy as pie. Simply add these two scripts to your page. 

    <script type=”text/javascript” src=”http://assets.tumblr.com/javascript/tumblelog.js”></script>

            <script type=”text/javascript” src=”http://coulson84.tumblr.com/api/read/js”></script>

    The first script gives you access to certain methods - specifically the renderVideo() function to easily embed any video that you may have included on your blog. The second script adds the global variable “tumblr_api_read” to your page. This is an object containing your posts in the form of an array of objects like so

    tumblr_api_read.posts = [{first post},{second post}, etc.];

    Each post is an object containing multiple property values. If you go here (opens link in a new window) you can see the code (html, css and javascript) in a stripped down format and with a tiny bit of editing (changing your username) will embed your Tumblr blog on to any webpage the code is placed on. Bits where you might want/need to change are commented in the javascript code.

    All in all (with a bit of trouble too get the video working) it took me about 4 hours from start to finish to embed my code on my webpage. If you are viewing this blog on tumblr you can see my webpage here.

    If anyone ever finds this I hope you find it useful and if you want to ask me any questions about embedding your Tumblr blog on your website please do. I’ll do my best to get back to you.

    2 years ago  /  12 notes  / 

    1. imw8 reblogged this from coulson84
    2. gimmeexposure reblogged this from coulson84
    3. mchdutils reblogged this from coulson84
    4. coulson84 posted this