¿Cómo crear un sitemap automático o una tabla de contenidos para mi blog de Blogger?

Aprende a crear un Sitemap Automático en Blogger con un Solo Código

Guía completa para mostrar todos tus artículos organizados por categorías

Introducción: Why You Need a Sitemap

Hoy responderé a una de las preguntas más frecuentes: cómo hacer un sitemap con un solo código que muestre todos los artículos publicados. La solución para usuarios de Blogger es sorprendentemente simple: solo necesitas insertar un código y realizar un pequeño cambio, sin necesidad de modificar el HTML de tu plantilla.

Anteriormente he publicado guías sobre cómo insertar un widget de comentarios y transformar etiquetas a menú desplegable. Todos estos trucos están diseñados para ser implementados fácilmente.

Live Demo: See It in Action

Puedes ver una demostración funcional en mi blog:

Step-by-Step Implementation

1. Accede a tu panel de Blogger

Inicia sesión en Blogger.com

2. Crea una nueva página

Haz clic en "Páginas" → "Página nueva" → "Página en blanco"

Crear nueva página en Blogger

3. Configura el título

En "Título de la página" escribe "Sitemap"

4. Cambia al modo HTML

Haz clic en el icono "HTML" en la esquina superior izquierda

Modo HTML en Blogger

5. Inserta el código del sitemap

Copia y pega el siguiente código:


<style>
p.labels a{color: #242424; text-transform: uppercase;font-size: 15px;}
a.post-titles {color: #0000FF;}
ol li{list-style-type:decimal;line-height:25px;}
</style>
<script>
//<![CDATA[
var postTitle=new Array();var postUrl=new Array();var postPublished=new Array();var postDate=new Array();var postLabels=new Array();var postRecent=new Array();var sortBy="titleasc";var tocLoaded=false;var numChars=250;var postFilter="";var numberfeed=0;function bloggersitemap(a){function b(){if("entry" in a.feed){var d=a.feed.entry.length;numberfeed=d;ii=0;for(var h=0;h')}function filterPosts(a){scroll(0,0);postFilter=a;displayToc(postFilter)}function allPosts(){sortlabel();postFilter="";displayToc(postFilter)}function sortPosts(d){function c(e,g){var f=postTitle[e];postTitle[e]=postTitle[g];postTitle[g]=f;var f=postDate[e];postDate[e]=postDate[g];postDate[g]=f;var f=postUrl[e];postUrl[e]=postUrl[g];postUrl[g]=f;var f=postLabels[e];postLabels[e]=postLabels[g];postLabels[g]=f;var f=postPublished[e];postPublished[e]=postPublished[g];postPublished[g]=f;var f=postRecent[e];postRecent[e]=postRecent[g];postRecent[g]=f}for(var b=0;bpostTitle[a]){c(b,a)}}if(d=="titledesc"){if(postTitle[b]postDate[a]){c(b,a)}}if(d=="datenewest"){if(postDate[b]postLabels[a]){c(b,a)}}}}}function sortlabel(){sortBy="orderlabel";sortPosts(sortBy);var a=0;var b=0;while(bpostTitle.length){break}}}function sortPosts2(d,c){function e(f,h){var g=postTitle[f];postTitle[f]=postTitle[h];postTitle[h]=g;var g=postDate[f];postDate[f]=postDate[h];postDate[h]=g;var g=postUrl[f];postUrl[f]=postUrl[h];postUrl[h]=g;var g=postLabels[f];postLabels[f]=postLabels[h];postLabels[h]=g;var g=postPublished[f];postPublished[f]=postPublished[h];postPublished[h]=g;var g=postRecent[f];postRecent[f]=postRecent[h];postRecent[h]=g}for(var b=d;bpostTitle[a]){e(b,a)}}}}function displayToc(a){var l=0;var h="";var e="Post Title";var m="Click to sort by title";var d="Date";var k="Click to sort by date";var c="Category";var j="";if(sortBy=="titleasc"){m+=" (descending)";k+=" (newest first)"}if(sortBy=="titledesc"){m+=" (ascending)";k+=" (newest first)"}if(sortBy=="dateoldest"){m+=" (ascending)";k+=" (newest first)"}if(sortBy=="datenewest"){m+=" (ascending)";k+=" (oldest first)"}if(postFilter!=""){j="Click to view all"}h+="";h+="";h+='";h+='";h+='";h+='";h+="";for(var g=0;g';l++}else{z=postLabels[g].lastIndexOf(a);if(z!=-1){h+='';l++}}}h+="
';h+=''+e+"";h+="';h+=''+d+"";h+="';h+=''+c+"";h+="';h+="Read all";h+="
'+postTitle[g]+''+postDate[g]+''+postLabels[g]+'Read
'+postTitle[g]+''+postDate[g]+''+postLabels[g]+'Read
";if(l==postTitle.length){var f='Show All '+postTitle.length+" Posts
"}else{var f='Show '+l+" posts by category '";f+=postFilter+"' the "+postTitle.length+" Total Posts
"}var b=document.getElementById("toc");b.innerHTML=f+h}function displayToc2(){var a=0;var b=0;while(b");document.write('

'+temp1+"

    ");firsti=a;do{document.write("
  1. ");document.write(''+postTitle[a]+"");if(postRecent[a]==true){document.write(' - Nuevo!')}document.write("
  2. ");a=a+1}while(postLabels[a]==temp1);b=a;document.write("
");sortPosts2(firsti,a);if(b>postTitle.length){break}}}function toggleTitleSort(){if(sortBy=="titleasc"){sortBy="titledesc"}else{sortBy="titleasc"}sortPosts(sortBy);displayToc(postFilter)}function toggleDateSort(){if(sortBy=="datenewest"){sortBy="dateoldest"}else{sortBy="datenewest"}sortPosts(sortBy);displayToc(postFilter)}function showToc(){if(tocLoaded){displayToc(postFilter);var a=document.getElementById("toclink")}else{alert("Just wait... TOC is loading")}}function hideToc(){var a=document.getElementById("toc");a.innerHTML="";var b=document.getElementById("toclink");b.innerHTML='?? Display Table of Contents '}function looptemp2(){for(var a=0;a");document.write('Post Link : '+postTitle[a]+"
");document.write('Read all : '+postTitle[a]+"
");document.write("
")}}; //]]> </script> <script src="https://ayudadeblogger.com/feeds/posts/default?max-results=9999&amp;alt=json-in-script&amp;callback=bloggersitemap"></script>

6. Personalización clave

Reemplaza ayudadeblogger.com por la URL de tu propio blog

7. Publica y visualiza

Haz clic en "Publicar" y luego en "Visualizar" para ver los resultados

Publicar sitemap en Blogger

Dynamic Features: How It Works

Este sitemap automático tiene características avanzadas:

  • Se actualiza automáticamente con cada nuevo artículo
  • Organiza el contenido por etiquetas/categorías
  • Marca artículos recientes con etiqueta "Nuevo!"
  • Es completamente responsive (se adapta a móviles)
  • Puedes colocarlo en cualquier parte de tu blog

Need Help? Common Issues Solved

Si tienes problemas con la implementación:

1. Verifica que hayas cambiado la URL correctamente

2. Asegúrate de estar en modo HTML al pegar el código

3. Si no aparecen artículos, revisa que tengas etiquetas asignadas

Para preguntas específicas, déjalas en los comentarios.

Recuerda suscribirte:

Obtenga nuestro boletín de noticias diario | Suscríbete gratuitamente SUSCRIBIRSE
¿Te ha resultado útil este artículo, recomiendanos?
Si



Share:

Comentarios

24 comentarios: