<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <url>
        <loc>https://rahuljain.dev/</loc>
        <lastmod>2026-06-09</lastmod>
        <changefreq>weekly</changefreq>
        <priority>1.0</priority>
    </url>
    <url>
        <loc>https://rahuljain.dev/work.html</loc>
        <lastmod>2026-06-09</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.8</priority>
    </url>
    <url>
        <loc>https://rahuljain.dev/blog/index.php</loc>
        <lastmod>2026-06-09</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.9</priority>
    </url>
    <?php
    // Dynamic blog post URLs
    $conn = new mysqli('localhost', 'username', 'password', 'database');
    $result = $conn->query("SELECT slug, published_at FROM blog_posts WHERE status = 'published'");
    while ($row = $result->fetch_assoc()) {
        echo '<url>';
        echo '<loc>https://rahuljain.dev/blog/post.php?slug=' . urlencode($row['slug']) . '</loc>';
        echo '<lastmod>' . date('Y-m-d', strtotime($row['published_at'])) . '</lastmod>';
        echo '<changefreq>monthly</changefreq>';
        echo '<priority>0.6</priority>';
        echo '</url>';
    }
    ?>
</urlset>