Sunday, May 16, 2010

Keep your Blogger Template Clean with the HTML and JS Gadget

This is a short note. A little while ago Blogger announced the introduction of their Blogger Template Designer. The Blogger Template designer was a great addition, allowing very easy modifications to blog design from a number of good-looking starting points.

The implication of the Blogger Template designer is that for many people, editing the template code directly is no longer required. In fact, if you use Blogger Template Designer, you probably shouldn't. The reason is that while your template markup remains untouched by human hands, Google can maintain it, improving browser support, accessibility, searchability or anything else.


But the idea of not manually editing your Blogger code may cause an immediate objection: Many add-in scripts (for example, Google Analytics) need to be placed somewhere in the markup, typically just before the closing BODY tag. You certainly do not want to give up on these amenities.

The solution is to use a HTML/Javascript gadget (you can find this in the blogger gadget library). Pasting your add in code into one of these (and making sure the title is removed) is a good way to making sure your add-in code is run and your template code remains untouched and therefore maintainable by Google. The other advantage of segregating your add-in scripts and markup is that it makes transitioning to a new template much less painful since you do not need to re-apply your previous changes.

The HTML/Javascript gadget is not useful for all situations. If you have made changes or additions to the way individual blog entries appear (for example, adding additional sharing functionality) , you still have little choice but to edit the template markup directly. For my requirements, however, this is not an issue.

1 comment:

  1. thnaks sir.. but in my site when ever i open any posts or links eg: http://www.thattukadablog.com/2011/01/blog-post_10.html

    its showing Internet explorer cannot open the Internet site .... Operation Aborted... wats the solution for this. Please help me sir.

    ReplyDelete