Friday, August 13, 2010

Easily make HTML sitemap table of content javascript

Update: the script created by/hosted by Abu Farhan has been found to cause blogs using it to automatically create HTML Sitemap/Table of Content has been found to cause the blog to be locked for malware (if you still want to use it, perhaps use it for a test blog to see if the problem still persist).

Alternatively use the methods outlined in How to make Table of Content with Link List to create your Table of Content manually.

A commentator at Blogger Tips and Tricks (HTML) Sitemap (Table of Content) said: "Hi Peter, This sitemap is really good and helpful. I would like to add a sitemap like this one to my blogger blogs. Can you please give me a detailed reply on creating a sitemap like this and loading it to blogs and then to Webmaster tools."

Fortunately for me, that is not difficult a task for all you need to do is to first create a post or better, a static page, making sure you are in the Edit HTML mode, copy the following Javascript:

<script style="text/javascript" src="http://www.abu-farhan.com/script/daftarisiblogger/blogtoc-min.js"></script>
<script src="http://myblog.blogspot.com/feeds/posts/default?max-results=9999&alt=json-in-script&callback=loadtoc"></script>


making sure to replace http://myblog.blogspot.com with the actual URL of your blog. To make this clearer, below are 2 examples of the codes I used to create such HTML sitemaps of 2 of my blogs, one of which is Easily make HTML sitemap for your blog using Javascript

Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics