So I am already using the built-in sitemap generator that comes with Sitecore 9.3 and that works fine. I am able to get out pages that are in the content tree. The issue comes when my company wants to show the pages that are dynamically created from a static page in the content tree but then uses variables from the CMP to build out the page with service calls. Here are my examples:
Page in the tree that shouldn't be on the sitemap
www.myfakesite.com/product-page (isn't an actual page, just use it for some static content)
Page NOT in the tree that shouldn't be on the sitemap
www.myfakesite.com/product-page/pagecode/yearcode (pagecode and yearcode come from data in the content hub and this could be a combination of hundreds of codes and years)
So I need a way to dynamically pull in and create a sitemap entry for these pages and have no clue where to begin. Any help would be great.