<?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:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
    <url>
        <loc>http://cardconnect.srhosting.tk/</loc>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
    </url>
    <url>
        <loc>http://cardconnect.srhosting.tk/about</loc>
        <changefreq>monthly</changefreq>
        <priority>0.8</priority>
    </url>
    <url>
        <loc>http://cardconnect.srhosting.tk/contact</loc>
        <changefreq>monthly</changefreq>
        <priority>0.8</priority>
    </url>
    <url>
        <loc>http://cardconnect.srhosting.tk/blog/my-first-post</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>http://cardconnect.srhosting.tk/blog/another-post</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <!-- Dynamically generated blog post URLs from the database -->
    <!-- Example: Replace with server-side code or template logic to loop through blog posts -->
    <!--
    <url>
        <loc>http://cardconnect.srhosting.tk/blog/{post-slug}</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    -->
    <!-- Dynamically generated blog post URLs fetched from /blog route -->

    <!-- React cannot generate sitemap.xml dynamically at runtime in the public folder.
        You need to generate sitemap.xml at build time using a Node.js script.
        Example Node.js script to fetch blog posts and generate sitemap.xml: -->

    <!-- Save this as generate-sitemap.js and run it before building/deploying your React app -->

    <!-- // generate-sitemap.js
    const fs = require('fs');
    const fetch = require('node-fetch');

    const API_URL = 'https://cardconnect.srhosting.tk/backend/api/blog';
    const BASE_URL = 'http://cardconnect.srhosting.tk';

    async function generateSitemap() {
      const res = await fetch(API_URL);
      const posts = await res.json();

      let urls = posts.map(post => `
        <url>
         <loc>${BASE_URL}/blog/${post.slug}</loc>
         <changefreq>weekly</changefreq>
         <priority>0.7</priority>
        </url>
      `).join('');

      // Read existing sitemap.xml
      let sitemap = fs.readFileSync('./public/sitemap.xml', 'utf8');
      // Insert URLs at placeholder
      sitemap = sitemap.replace('$SELECTION_PLACEHOLDER$', urls);

      fs.writeFileSync('./public/sitemap.xml', sitemap, 'utf8');
    }

    generateSitemap(); -->

    <url>
        <loc>http://cardconnect.srhosting.tk/blog/event-management-in-the-digital-era</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>http://cardconnect.srhosting.tk/blog/best-practices-for-qr-code-marketing</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>http://cardconnect.srhosting.tk/blog/the-future-of-digital-networking-how-qr-codes-are-revolutionizing-business-cards</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>http://cardconnect.srhosting.tk/blog/from-startup-to-success-how-digital-networking-transformed-my-business</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>http://cardconnect.srhosting.tk/blog/the-future-of-digital-business-cards</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>http://cardconnect.srhosting.tk/blog/5-essential-tips-for-creating-an-effective-digital-business-card</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>http://cardconnect.srhosting.tk/blog/sustainability-in-business-why-digital-cards-matter-for-the-environment</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>

    <url>
        <loc>http://cardconnect.srhosting.tk/blog/latest-news</loc>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
</urlset>