<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
        xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
  
  <!-- Homepage -->
  <url>
    <loc>https://nidheeshsaxena.com/</loc>
    <lastmod>2024-01-01</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>
  
  <!-- About Page -->
  <url>
    <loc>https://nidheeshsaxena.com/about.html</loc>
    <lastmod>2024-01-01</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>
  
  <!-- Leadership Page -->
  <url>
    <loc>https://nidheeshsaxena.com/leadership.html</loc>
    <lastmod>2024-01-01</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>
  
  <!-- Career Page -->
  <url>
    <loc>https://nidheeshsaxena.com/career.html</loc>
    <lastmod>2024-01-01</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>
  
  <!-- Blog Page -->
  <url>
    <loc>https://nidheeshsaxena.com/blog.html</loc>
    <lastmod>2024-01-01</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.9</priority>
  </url>
  
  <!-- Contact Page -->
  <url>
    <loc>https://nidheeshsaxena.com/contact.html</loc>
    <lastmod>2024-01-01</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.7</priority>
  </url>
  
  <!-- Blog Posts (Dynamic) -->
  <?php
  // Include blog posts dynamically
  $posts_dir = __DIR__ . '/blog-posts/';
  if (is_dir($posts_dir)) {
    foreach (glob($posts_dir . '*.json') as $file) {
      $post = json_decode(file_get_contents($file), true);
      if ($post) {
        $slug = basename($file, '.json');
        $lastmod = date('Y-m-d', strtotime($post['date']));
        echo "  <url>\n";
        echo "    <loc>https://nidheeshsaxena.com/blog.php?slug=" . htmlspecialchars($slug) . "</loc>\n";
        echo "    <lastmod>" . $lastmod . "</lastmod>\n";
        echo "    <changefreq>monthly</changefreq>\n";
        echo "    <priority>0.6</priority>\n";
        echo "  </url>\n";
      }
    }
  }
  ?>
  
</urlset> 