<h2>Sitemap</h2>
<p>Yahan aapke blog ke sabhi latest posts listed hain:</p>
<ul id="sitemap-list" style="list-style: none; padding-left: 0;"></ul>
<script type="text/javascript">
const feedUrl = "https://skinstitutepkl.blogspot.com/feeds/posts/default?alt=json&max-results=150";
fetch(feedUrl)
.then(response => response.json())
.then(data => {
const posts = data.feed.entry;
let html = "";
if (posts && posts.length > 0) {
posts.forEach(post => {
const title = post.title.$t;
const url = post.link.find(link => link.rel === "alternate").href;
html += `<li style="margin-bottom: 8px;"><a href="${url}" target="_blank" style="text-decoration: none; color: #2c3e50;">🔗 ${title}</a></li>`;
});
} else {
html = "<li>Koi post nahi mila.</li>";
}
document.getElementById("sitemap-list").innerHTML = html;
})
.catch(error => {
console.error("Error fetching posts:", error);
document.getElementById("sitemap-list").innerHTML = "<li>Unable to load sitemap.</li>";
});
</script>
Comments