Hướng dẫn tạo sơ đồ trang web HTML cho Blogspot đơn giản nhất
Mục lục bài viết
Lợi ích của việc sử dụng sitemap cho Blogspot
Trải nghiệm người dùng tốt hơn
Mặc dù sơ đồ trang web được thiết kế chủ yếu để mang lại lợi ích cho công cụ tìm kiếm nhưng chúng cũng có thể cải thiện trải nghiệm người dùng trên blog Blogspot của bạn. Bằng cách cung cấp danh sách đầy đủ tất cả các URL trong blog của bạn, khách truy cập có thể dễ dàng điều hướng qua nội dung của bạn và tìm thấy những gì họ đang tìm kiếm, cuối cùng là nâng cao sự hài lòng và mức độ tương tác của người dùng.Lập chỉ mục được cải thiện
Bằng cách cung cấp lộ trình của tất cả các trang trên blog của bạn, bạn giúp các bot công cụ tìm kiếm thu thập dữ liệu và lập chỉ mục nội dung của bạn dễ dàng hơn. Điều này có thể dẫn đến nhiều bài đăng và trang blog của bạn được đưa vào kết quả của công cụ tìm kiếm hơn, cuối cùng là tăng khả năng hiển thị cho blog của bạn.Hiệu suất SEO nâng cao
Khi các công cụ tìm kiếm hiểu rõ cấu trúc và nội dung blog của bạn, chúng có thể xác định tốt hơn mức độ liên quan của các trang của bạn đối với các truy vấn tìm kiếm cụ thể. Điều này có thể dẫn đến thứ hạng được cải thiện và tăng lưu lượng truy cập không phải trả tiền vào blog của bạn.Hướng dẫn cách tạo sitemap HTML cho Blogspot
Bước 1: tạo một trang mới cho blog của bạn.Bước 2: thêm tiêu đề trang, khuyên dùng tên là "sitemap".
Bước 3: copy và dán javascript bên dưới vào phần soạn thảo HTML.
<script type='text/javascript'>
var postTitle=new Array,postUrl=new Array,postPublished=new Array,postDate=new Array,postLabels=new Array,postRecent=new Array,sortBy="titleasc",numberfeed=0;function bloggersitemap(t){!function(){if("entry"in t.feed){var e=t.feed.entry.length;numberfeed=e,ii=0;for(var s=0;s<e;s++){for(var o,i=t.feed.entry[s],l=i.title.$t,r=i.published.$t.substring(0,15),p=0;p<i.link.length;p++)if("alternate"==i.link[p].rel){o=i.link[p].href;break}var a="";for(p=0;p<i.link.length;p++)if("enclosure"==i.link[p].rel){a=i.link[p].href;break}var n="";if("category"in i)for(p=0;p<i.category.length;p++){var c=(n=i.category[p].term).lastIndexOf(";");-1!=c&&(n=n.substring(0,c)),postLabels[ii]=n,postTitle[ii]=l,postDate[ii]=r,postUrl[ii]=o,postPublished[ii]=a,postRecent[ii]=s<10,ii+=1}}}}(),sortPosts(sortBy="titledesc"),sortlabel(),displayToc()}function sortPosts(t){function e(t,e){var s=postTitle[t];postTitle[t]=postTitle[e],postTitle[e]=s,s=postDate[t],postDate[t]=postDate[e],postDate[e]=s,s=postUrl[t],postUrl[t]=postUrl[e],postUrl[e]=s,s=postLabels[t],postLabels[t]=postLabels[e],postLabels[e]=s,s=postPublished[t],postPublished[t]=postPublished[e],postPublished[e]=s,s=postRecent[t],postRecent[t]=postRecent[e],postRecent[e]=s}for(var s=0;s<postTitle.length-1;s++)for(var o=s+1;o<postTitle.length;o++)"titleasc"==t&&postTitle[s]>postTitle[o]&&e(s,o),"titledesc"==t&&postTitle[s]<postTitle[o]&&e(s,o),"dateoldest"==t&&postDate[s]>postDate[o]&&e(s,o),"datenewest"==t&&postDate[s]<postDate[o]&&e(s,o),"orderlabel"==t&&postLabels[s]>postLabels[o]&&e(s,o)}function sortlabel(){sortPosts(sortBy="orderlabel");for(var t=0,e=0;e<postTitle.length;){temp1=postLabels[e],firsti=t;do{t+=1}while(postLabels[t]==temp1);if(e=t,sortPosts2(firsti,t),e>postTitle.length)break}}function sortPosts2(t,e){function s(t,e){var s=postTitle[t];postTitle[t]=postTitle[e],postTitle[e]=s,s=postDate[t],postDate[t]=postDate[e],postDate[e]=s,s=postUrl[t],postUrl[t]=postUrl[e],postUrl[e]=s,s=postLabels[t],postLabels[t]=postLabels[e],postLabels[e]=s,s=postPublished[t],postPublished[t]=postPublished[e],postPublished[e]=s,s=postRecent[t],postRecent[t]=postRecent[e],postRecent[e]=s}for(var o=t;o<e-1;o++)for(var i=o+1;i<e;i++)postTitle[o]>postTitle[i]&&s(o,i)}function displayToc(){for(var t=0,e=0;e<postTitle.length;){temp1=postLabels[e],document.write(""),document.write('<div class="post-archive"><h4>'+temp1+'</h4><div class="ct-columns">'),firsti=t;do{document.write("<p>"),document.write('<a " href="'+postUrl[t]+'">'+postTitle[t]),1==postRecent[t]&&document.write(" - <strong><span>New!</span></strong>"),document.write("</a></p>"),t+=1}while(postLabels[t]==temp1);if(e=t,document.write("</div></div>"),sortPosts2(firsti,t),e>postTitle.length)break}}
</script>
<script src="/feeds/posts/summary?alt=json-in-script&max-results=9999&callback=bloggersitemap" type="text/javascript"></script>
Đăng nhận xét