title: Automatically generate dynamic Sitemap.xml for Nuxt VueJs Firestore App
body: <p>I have a site similar to Stackoverflow where users can create a post (or question) which gets its own URL and should be SEO optimized. Therefore I need to include these dynamic pages in my SiteMap.xml. I would like to find an automatic way to insert each dynamic URL to my Sitemap when initially created.</p>
  
  <p>Hoping to not reinvent the wheel, I found <a href="https://github.com/nuxt-community/sitemap-module" rel="nofollow noreferrer">sitemap-module</a> for nuxt, however the example they use for dynamic pages is statically written, so not sure what good that does.</p>
  
  <p>I am having a hard time even conceptualizing how to set this up and what is possible with current infrastructure. Can Firestore functions update source code and redeploy or are there any firestore hosting features to help? Could/ should I set up a cron job to run every night to first run a script to query firestore and update sitemap file on local computer, then automatically deploy it to firestore from command line? Any script examples?</p>
  
  <p>Tech used: VueJS, Node.js, Nuxt/ SSR, Firestore (db and hosting), and Express</p>